Details
-
Bug
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
10.4(EOL), 10.6, 10.10(EOL), 11.0(EOL), 11.3(EOL)
-
None
Description
my_read() may return -1 in case of errors. However, because it’s return type is unsigned (size_t) it actually returns 18446744073709551615. Some functions that call my_read() either do not check the result at all or expect a signed result and check it as “if my_read() > 0”. This might lead to arithmetic overflows, allocations of huge memory buffers, or other unexpected behavior.