Fixed possible overflows in reading the user mapping file
parent
219491bf27
commit
a2dab6b2ff
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue