mirror of
git://sourceware.org/git/lvm2.git
synced 2025-08-25 13:49:28 +03:00
A bit more safe version of sprintf
Use just buffer size limit (it's used for debug only)
This commit is contained in:
@ -303,7 +303,7 @@ static const char *decode_cmd(unsigned char cmdl)
|
||||
break;
|
||||
}
|
||||
|
||||
sprintf(buf, "%s (0x%x)", command, cmdl);
|
||||
snprintf(buf, sizeof(buf), "%s (0x%x)", command, cmdl);
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
Reference in New Issue
Block a user