[Nut-upsdev] [nut-commits] svn commit r1040 - in trunk: . data drivers man

Charles Lepple clepple at gmail.com
Sat Aug 11 01:39:54 UTC 2007


On 8/10/07, Arjen de Korte <adkorte-guest at alioth.debian.org> wrote:
> Author: adkorte-guest
> Date: Fri Aug 10 19:16:48 2007
> New Revision: 1040
>
> Log:
> From the ChangeLog:
[...]
>   - Use snprintf instead of sprintf where possible.

In general, this is a good idea, but what if the resulting string is
exactly sizeof(buf) ? Shouldn't it be sizeof()-1 with a terminating
NUL character at the end?

-- 
- Charles Lepple



More information about the Nut-upsdev mailing list