Bug 13142 - samba-4.7.2/source3/utils/net_idmap.c: 2 * bad width ?
samba-4.7.2/source3/utils/net_idmap.c: 2 * bad width ?
Status: NEW
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Other
4.7.2
All All
: P5 normal
: ---
Assigned To: Andrew Bartlett
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-11-15 14:14 UTC by David Binderman
Modified: 2017-11-15 14:14 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Binderman 2017-11-15 14:14:04 UTC
1.
samba-4.7.2/source3/utils/net_idmap.c:420]: (error) Width 128 given in format string (no. 2) is larger than destination buffer 'sid_string[128]', use %127s to prevent overflowing it.

Source code is

       if (sscanf(line, "GID %lu %128s", &idval, sid_string) == 2)

Maybe better code:

       if (sscanf(line, "GID %lu %127s", &idval, sid_string) == 2)

2.

[samba-4.7.2/source3/utils/net_idmap.c:427]: (error) Width 128 given in format string (no. 2) is larger than destination buffer 'sid_string[128]', use %127s to prevent overflowing it.

Duplicate.