Mingjie Shen

Results 47 issues of Mingjie Shen

Testing for overflow by adding a value to a variable to see if it "wraps around" works only for unsigned integer values. Signed integer overflow is undefined behavior in C...

All functions that are not void should return a value on every exit path.

snprintf() is both safer and more efficient than strcat() when concatenating many strings into one.

Unsigned subtraction can never be negative.

The result of these calls to searchAttributeNyName is not checked for null, but 92% of calls to searchAttributeNyName check for null. https://github.com/alrevuelta/cONNXr/blob/7108b7b9003b3614afd1a80b8e0ea8337a9c3a89/src/operators/ai.onnx/Constant/12/prepare_operator__ai_onnx__constant__12.c#L19 https://github.com/alrevuelta/cONNXr/blob/7108b7b9003b3614afd1a80b8e0ea8337a9c3a89/src/operators/ai.onnx/MaxPool/12/prepare_operator__ai_onnx__maxpool__12.c#L26

https://github.com/TrampolineRTOS/trampoline/blob/7ac178b0f67268735e8f9084cac49efe545ae80c/os/tpl_os_timeobj_kernel.c#L231 The variable last_to may not be initialized at this access.

Separately checking the state of a file before operating on it may allow an attacker to modify the file between the two operations. Fix by calling readlink first. If that...