[Spice-devel] BUG? NULL pointer check in quic_encode, but quic_encode is always called with a NULL
Nahum Shalman
nshalman at elys.com
Tue Mar 27 14:01:12 PDT 2012
Hey everyone, I think I found a bug:
I've been living on the bleeding edge of the spice repos and a vm I was
running was tripping over
quic.c line 1242 (lots of errors spewing on the console).
It looks like a sane check for NULL pointers in the quic_encode function:
1241 if (line == NULL) {
1242 spice_warn_if_reached();
1243 return QUIC_ERROR;
1244 }
The only problem is that the *only* call to quic_encode in the spice
server...
~/spice $ git grep -n quic_encode
server/red_worker.c:6119: size = quic_encode(quic, type, src->x,
src->y, NULL, 0, stride,
*calls it with a NULL* !?
git blame points at c1403ee6bf4dfdd8f614f84ef145083b06a9f23e so I'm
CC'ing the author.
I think that either the NULL pointer check is wrong, or that red_worker
shouldn't be passing a NULL to quic_encode...
but I'm not sure which is the case.
Thanks!
-Nahum
More information about the Spice-devel
mailing list