ejoy / ejoy2d

A 2D Graphics Engine for Mobile Game
MIT License
1.98k stars 641 forks source link

PVS-Studio: CWE-476 NULL Pointer Dereference #103

Closed ivanovivantula closed 7 years ago

ivanovivantula commented 7 years ago

We have found a weakness using PVS-Studio tool. PVS-Studio is a static code analyzer for C, C++ and C#: PVS-Studio on Visual Studio Marketplace

Analyzer warning: V595 The 'buf' pointer was utilized before it was verified against nullptr. Check lines: 185, 190. ejoy2d spritepack.c 185 A link to the source code.

cloudwu commented 7 years ago

It's ok. ialloc() always returns enough memory.