You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In archive_windows.c, __la_dosmaperr(unsigned long e):
for (i = 0; i < (int)sizeof(doserrors); i++)
should be:
for (i = 0; i < (int)sizeof(doserrors)/sizeof(doserrors[0]); i++)
Found by Coverity:
cond_at_most: Checking i < 368 implies that i may be up to 367 on the true branch.
894 for (i = 0; i < (int)sizeof(doserrors); i++)
895 {
3. Condition doserrors[i].winerr == e, taking false branch
Out-of-bounds read (OVERRUN)
7. overrun-local: Overrunning array doserrors of 46 8-byte elements at element index 367 (byte offset 2936) using index i (which evaluates to 367).
896 if (doserrors[i].winerr == e)
897 {
898 errno = doserrors[i].doserr;
899 return;
900 }
The text was updated successfully, but these errors were encountered:
In archive_windows.c, __la_dosmaperr(unsigned long e):
for (i = 0; i < (int)sizeof(doserrors); i++)
should be:
for (i = 0; i < (int)sizeof(doserrors)/sizeof(doserrors[0]); i++)
Found by Coverity:
894 for (i = 0; i < (int)sizeof(doserrors); i++)
895 {
3. Condition doserrors[i].winerr == e, taking false branch
Out-of-bounds read (OVERRUN)
7. overrun-local: Overrunning array doserrors of 46 8-byte elements at element index 367 (byte offset 2936) using index i (which evaluates to 367).
896 if (doserrors[i].winerr == e)
897 {
898 errno = doserrors[i].doserr;
899 return;
900 }
The text was updated successfully, but these errors were encountered: