[omniORB-dev] Completion of error handling
Markus Elfring
Markus.Elfring at web.de
Fri Nov 3 14:33:29 UTC 2023
>> Would you like to add more error handling for return values from
>> functions
>> like the following?
>>
>> * malloc() ⇒ GetOpenNTMounts()
>> https://sourceforge.net/p/omniorb/svn/6666/tree/branches/4_4/omniORB/src/tool/omkdepend/gnuwin32.c#l144
>>
>> * strdup() ⇒ main()
>> https://sourceforge.net/p/omniorb/svn/6666/tree/branches/4_4/omniORB/src/appl/omniMapper/omniMapper.cc#l238
>
> In general, we want omniORB to be robust against this sort of thing,
Thanks for such feedback.
> but in those two specific cases there is no need.
I suggest to adjust case distinctions another bit.
> The first is in dead code that is never used any more;
Can such a detail be indicated in a clearer way?
> the second is in startup code for a command line tool
> that will never conceivably fail.
I hope that secure programming guidelines can be applied here.
https://wiki.sei.cmu.edu/confluence/display/c/ERR00-C.+Adopt+and+implement+a+consistent+and+comprehensive+error-handling+policy
Regards,
Markus
More information about the omniORB-dev
mailing list