Potential issues/suggestions for zm_debug.c

Support and queries relating to all previous versions of ZoneMinder
Locked
snakebyte
Posts: 45
Joined: Sun Dec 07, 2003 1:51 am

Potential issues/suggestions for zm_debug.c

Post by snakebyte »

On line 332:
if ( 1 || zm_dbg_code <= ZM_DBG_INF )

This conditional will always evaluate to true.

On line 361:
return( strlen( zm_temp_dbg_string ) );

return value is declared as int while strlen returns a size_t (unsigned). int will go negative when strlen returns anything above 0x7FFFFFFF. It would take a pretty long string to return something like that, so I doubt this is a real problem, but just wanted to FYI.
Locked