PVS/V512: memcpy overflow/underflow #10642

problem:  bfredl: pvs thinks the type of the pointed
          at item is too small.
solution: refactored address calculation.
This commit is contained in:
Ihor Antonov 2019-07-28 17:05:18 -04:00 committed by Justin M. Keyes
parent fe2ada7375
commit f5b5f60b86

View File

@ -359,7 +359,7 @@ static void compose_line(Integer row, Integer startcol, Integer endcol,
attrbuf[i+1], &thru); attrbuf[i+1], &thru);
} }
if (thru) { if (thru) {
memcpy(linebuf[i], bg_line[i], (size_t)width * sizeof(linebuf[i])); memcpy(linebuf + i, bg_line + i, (size_t)width * sizeof(linebuf[i]));
} }
} }
} }