OpenPrinting / cups-browsed

Apache License 2.0
6 stars 4 forks source link

Init variables which can be later used uninitialized #26

Closed zdohnal closed 4 months ago

zdohnal commented 5 months ago

I ran openscanhub tool on cups-browsed code and fixed some of the important issues it reports - usage of uninitialized memory in the code.

Here are results - I didn't fix Y2K38_SAFETY and REVERSE_NEGATIVE, because:

Y2K38_SAFETY: timeout used there will never be that high to overflow - it is subtraction of current time from expected timeout of queue.

REVERSE_NEGATIVE: the value mentioned there comes from Avahi, so Avahi should take care of it being in valid interval.