vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Ted Unangst wrote: > On 3/28/06, Daniel Ouellet <daniel@presscom.net> wrote: >> + l = snprintf(errstr + len, sizeof(errstr) - len, >> + "[%s] ", priorities[level & APLOG_LEVELMASK].t_name); >> + if (l == -1 || l >= (int)sizeof(errstr)) > > the check for overflow is incorrect. the size parameter is > sizeof(errstr) - len, that is what you should check against. Shoot me! That was stupid from me. Need to get use to these new glasses of mine. Thanks for taking the time to check it out? I will redo it. Any other comments? I am still unsure the best OpenBSD approach for fail case here, return without changes assuming the calling side will check for errors, not likely all the time, or simply use errx type and exit? I appreciate your feedback and time into this already! Thanks Ted!! |
| Thread Tools | |
| Display Modes | |
|
|