diff options
author | Daniel Brahneborg <basic@chello.se> | 2002-03-03 22:02:40 +0000 |
---|---|---|
committer | Daniel Brahneborg <basic@chello.se> | 2002-03-03 22:02:40 +0000 |
commit | a4dcb0ecf632832258ebb523c6bc39b7b94f8775 (patch) | |
tree | 18cf38bb6ecd95671401414c2ba8381b6c90132f /lib/sistypes.h | |
parent | d92c2abcca7d9270f49cbfb09a27bfda86642c31 (diff) | |
download | plptools-a4dcb0ecf632832258ebb523c6bc39b7b94f8775.tar.gz plptools-a4dcb0ecf632832258ebb523c6bc39b7b94f8775.tar.bz2 plptools-a4dcb0ecf632832258ebb523c6bc39b7b94f8775.zip |
Add buffer overflow checks to handle truncated and corrupted sis files.
Diffstat (limited to 'lib/sistypes.h')
-rw-r--r-- | lib/sistypes.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/sistypes.h b/lib/sistypes.h index ce8b441..c763c4f 100644 --- a/lib/sistypes.h +++ b/lib/sistypes.h @@ -27,6 +27,15 @@ typedef unsigned short uint16; typedef unsigned int uint32; typedef unsigned char uchar; +/** + * Return Codes. + */ +enum SisRC { + SIS_OK = 0, + SIS_TRUNCATED, + SIS_CORRUPTED, +}; + extern uint16 read16(uchar* p); extern uint32 read32(uchar* p); |