Fixed possible overflows in reading the user mapping file

N2009_11_14_FIXES
jpandre 2008-08-03 07:20:58 +00:00
parent 219491bf27
commit a2dab6b2ff
1 changed files with 2 additions and 3 deletions

View File

@ -4233,11 +4233,10 @@ static struct MAPLIST *getmappingitem(
while ((src < *psize)
&& (buf[src] != '\n')) {
if (dst < LINESZ)
item->maptext[dst] = buf[src];
dst++;
item->maptext[dst++] = buf[src];
src++;
}
if (buf[src] != '\n') {
if ((src >= *psize) && (buf[src] != '\n')) {
*poffs += *psize;
if (ni)
*psize = ntfs_local_read(ni,