openac: Make sure path is null-terminated.
This commit is contained in:
1 parent
2653c08513
commit
68e9275134
1 file changed
+1
@@ -300,6 +300,7 @@ int main(int argc, char **argv)
|
|||||||
if (*optarg == '/') /* absolute pathname */
|
if (*optarg == '/') /* absolute pathname */
|
||||||
{
|
{
|
||||||
strncpy(path, optarg, BUF_LEN);
|
strncpy(path, optarg, BUF_LEN);
|
||||||
|
path[BUF_LEN-1] = '\0';
|
||||||
}
|
}
|
||||||
else /* relative pathname */
|
else /* relative pathname */
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user