gear-lib icon indicating copy to clipboard operation
gear-lib copied to clipboard

libsock: pointer al is checked for nullness after dereferencing

Open szsam opened this issue 2 years ago • 0 comments

In the following code snippet, the pointer al is checked for nullness after is has already been dereferenced. Should we move the check before the dereference?

https://github.com/gozfree/gear-lib/blob/5e1947fd7b86bad1c1ed9d9ce36591585e396793/gear-lib/libsock/libsock.c#L548-L551 https://github.com/gozfree/gear-lib/blob/5e1947fd7b86bad1c1ed9d9ce36591585e396793/gear-lib/libsock/libsock.c#L586-L589

szsam avatar May 12 '23 21:05 szsam