fix buffer overrun in some calls to sscanf
Reported-by: Sergei Antonov <saproj@gmail.com> Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
parent
cd903a0eba
commit
657d9adb71
7 changed files with 7 additions and 7 deletions
|
@ -478,7 +478,7 @@ static int loopcxt_next_from_proc(struct loopdev_cxt *lc)
|
|||
|
||||
while (fgets(buf, sizeof(buf), iter->proc)) {
|
||||
unsigned int m;
|
||||
char name[128];
|
||||
char name[128 + 1];
|
||||
|
||||
|
||||
if (sscanf(buf, " %u %*s %*s %128[^\n ]",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue