projects
/
project
/
ubox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
16f7e16
)
kmodloader/get_module_name: null-terminate the string
author
Alexander Couzens
<lynxis@fe80.eu>
Sun, 11 Jun 2017 10:13:05 +0000
(12:13 +0200)
committer
Alexander Couzens
<lynxis@fe80.eu>
Sun, 11 Jun 2017 12:29:13 +0000
(14:29 +0200)
Found-by: Coverity Scan #1412291
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
kmodloader.c
patch
|
blob
|
history
diff --git
a/kmodloader.c
b/kmodloader.c
index ed8f833fc3932caa7bfcc54228e21bd460a1a728..9aba52392d1e06fe69aee6f3101ce4ed78aee28e 100644
(file)
--- a/
kmodloader.c
+++ b/
kmodloader.c
@@
-155,10
+155,10
@@
static char* get_module_path(char *name)
static char* get_module_name(char *path)
{
- static char name[3
2
];
+ static char name[3
3
];
char *t;
- strncpy(name, basename(path), sizeof(name));
+ strncpy(name, basename(path), sizeof(name)
- 1
);
t = strstr(name, ".ko");
if (t)