• Arthur O'Dwyer's avatar
    The "count_" out-parameter is doubled instead of unchanged. · a48751b3
    Arthur O'Dwyer authored
    Static analysis says:
    src\zmq.cpp(489): error V220: Suspicious sequence of types castings: memsize -> 32-bit integer -> memsize. The value being casted: '* count_'.
    src\zmq.cpp(510): error V127: An overflow of the 32-bit 'nread' variable is possible inside a long cycle which utilizes a memsize-type loop counter.
    
    I've silenced the warning on line 489 and ignored the other.
    But also, it looks to me like there's a serious bug here: The
    out-parameter "count_" is never set to zero before we start
    incrementing it. So its final value will always be between
    1 and 2 times its initial value. The fix seems obvious.
    a48751b3
Name
Last commit
Last update
builds Loading commit data...
doc Loading commit data...
foreign/openpgm Loading commit data...
include Loading commit data...
perf Loading commit data...
src Loading commit data...
tests Loading commit data...
.gitignore Loading commit data...
.hgeol Loading commit data...
AUTHORS Loading commit data...
COPYING Loading commit data...
COPYING.LESSER Loading commit data...
INSTALL Loading commit data...
MAINTAINERS Loading commit data...
Makefile.am Loading commit data...
NEWS Loading commit data...
README Loading commit data...
acinclude.m4 Loading commit data...
autogen.sh Loading commit data...
branding.bmp Loading commit data...
configure.in Loading commit data...
installer.ico Loading commit data...
version.sh Loading commit data...