Some checks for return codes are missing.
Examples:
Would you like to add more error handling for return values from "malloc" like in the function "rfbSendSmallRectEncodingCoRRE" and from "fclose" in the function "rfbLoadConsoleFont"?
http://libvncserver.cvs.sourceforge.net/libvncserver/libvncserver/libvncserver/corre.c?revision=1.6&view=markup
http://libvncserver.cvs.sourceforge.net/libvncserver/libvncserver/libvncserver/font.c?revision=1.6&view=markup
Logged In: YES
user_id=27066
Originator: NO
Hi,
thank you! Yes, for malloc I would like it! Although I am not so sure about fclose(). Should we really error out in that case?
Ciao,
Dscho
Logged In: YES
user_id=572001
Originator: YES
Yes.
Do you know more places with unchecked function calls in the source files?
Logged In: YES
user_id=27066
Originator: NO
Hi,
no, not unless I would do a code review.
Wanna help?
Ciao,
Dscho
Logged In: YES
user_id=572001
Originator: YES
More open issues can be seen in the function "start_client_info_sock".
http://libvncserver.cvs.sourceforge.net/libvncserver/libvncserver/x11vnc/connections.c?revision=1.30&view=markup
- strdup
- fprintf
- write
Logged In: YES
user_id=572001
Originator: YES
http://libvncserver.cvs.sourceforge.net/libvncserver/libvncserver/libvncserver/main.c?revision=1.44&view=markup
Are you going to add checks for returned error codes?
Examples:
- LOCK, UNLOCK
- calloc
- fflush
- vfprintf
Logged In: YES
user_id=27066
Originator: NO
I am sorry. I do not have time right now to follow up on such unspecific
issues. (If you create a patch, I will look at it, though.)
Logged In: YES
user_id=572001
Originator: YES
What is "unspecific" about a recommended completition of the error handling?
I will not develop a patch before the general acceptance and approach for the proposed updates is clear.
Would you like to reduce the efforts for error code checking by a class hierarchy?
http://dietmar-kuehl.de/mirror/c++-faq/exceptions.html#faq-17.1
http://cexcept.sourceforge.net/
Are you going to integrate your source files into a Subversion repository (at SourceForge)?
Logged In: YES
user_id=27066
Originator: NO
> What is "unspecific" about a recommended completition of the error
> handling?
It is not a patch. It is some handwaving "there could be somewhere some
sort of return thing".
There are clearly places, where error values are returned, and there are
places that use these error values.
> I will not develop a patch before the general acceptance and approach for
> the proposed updates is clear.
Guess what: I will not tell you beforehand if I take your patch or not,
since I know nothing about the style, quality, and completeness of your
code.
> Would you like to reduce the efforts for error code checking by a class
> hierarchy?
> http://dietmar-kuehl.de/mirror/c++-faq/exceptions.html#faq-17.1
> http://cexcept.sourceforge.net/
I will not force acceptance of these things on users of LibVNCServer.
IOW: No.
> Are you going to integrate your source files into a Subversion repository
> (at SourceForge)?
The sources are tracked with Sourceforge's CVS service, although I use Git
to manage it locally.