diff options
Diffstat (limited to 'src/symutil.cpp')
-rw-r--r-- | src/symutil.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/symutil.cpp b/src/symutil.cpp index faed579..61a4fa0 100644 --- a/src/symutil.cpp +++ b/src/symutil.cpp @@ -33,6 +33,8 @@ int dsym2c(const BYTE* p, int len, char* cname, int maxclen) zpos = ((ch >> 3) & 7) + 1; // + zlen;
if (zpos > cpos)
break;
+ if (cpos + zlen >= maxclen)
+ break;
for (int z = 0; z < zlen; z++)
cname[cpos + z] = cname[cpos - zpos + z];
cpos += zlen;
@@ -49,6 +51,8 @@ int dsym2c(const BYTE* p, int len, char* cname, int maxclen) zpos = (ch3 & 0x7f) | ((ch & 7) << 7);
if (zpos > cpos)
break;
+ if (cpos + zlen >= maxclen)
+ break;
for(int z = 0; z < zlen; z++)
cname[cpos + z] = cname[cpos - zpos + z];
cpos += zlen;
|