diff options
-rw-r--r-- | meta/recipes-devtools/makedevs/makedevs/makedevs.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/meta/recipes-devtools/makedevs/makedevs/makedevs.c b/meta/recipes-devtools/makedevs/makedevs/makedevs.c index 2254b54891..411a669153 100644 --- a/meta/recipes-devtools/makedevs/makedevs/makedevs.c +++ b/meta/recipes-devtools/makedevs/makedevs/makedevs.c | |||
@@ -202,7 +202,7 @@ static unsigned long convert2guid(char *id_buf, struct name_id *search_list) | |||
202 | // Check for bad user/group name | 202 | // Check for bad user/group name |
203 | node = search_list; | 203 | node = search_list; |
204 | while (node != NULL) { | 204 | while (node != NULL) { |
205 | if (!strncmp(node->name, id_buf, strlen(id_buf))) { | 205 | if (!strncmp(node->name, id_buf, MAX_ID_LEN)) { |
206 | fprintf(stderr, "WARNING: Bad user/group name %s detected\n", id_buf); | 206 | fprintf(stderr, "WARNING: Bad user/group name %s detected\n", id_buf); |
207 | break; | 207 | break; |
208 | } | 208 | } |
@@ -212,7 +212,7 @@ static unsigned long convert2guid(char *id_buf, struct name_id *search_list) | |||
212 | } else { | 212 | } else { |
213 | node = search_list; | 213 | node = search_list; |
214 | while (node != NULL) { | 214 | while (node != NULL) { |
215 | if (!strncmp(node->name, id_buf, strlen(id_buf))) | 215 | if (!strncmp(node->name, id_buf, MAX_ID_LEN)) |
216 | return node->id; | 216 | return node->id; |
217 | node = node->next; | 217 | node = node->next; |
218 | } | 218 | } |
@@ -362,13 +362,13 @@ static void add_new_fifo(char *name, char *path, unsigned long uid, | |||
362 | static int interpret_table_entry(char *line) | 362 | static int interpret_table_entry(char *line) |
363 | { | 363 | { |
364 | char *name; | 364 | char *name; |
365 | char usr_buf[MAX_ID_LEN]; | 365 | char usr_buf[MAX_ID_LEN+1]; |
366 | char grp_buf[MAX_ID_LEN]; | 366 | char grp_buf[MAX_ID_LEN+1]; |
367 | char path[4096], type; | 367 | char path[PATH_MAX], type; |
368 | unsigned long mode = 0755, uid = 0, gid = 0, major = 0, minor = 0; | 368 | unsigned long mode = 0755, uid = 0, gid = 0, major = 0, minor = 0; |
369 | unsigned long start = 0, increment = 1, count = 0; | 369 | unsigned long start = 0, increment = 1, count = 0; |
370 | 370 | ||
371 | if (0 > sscanf(line, "%4095s %c %lo %39s %39s %lu %lu %lu %lu %lu", path, | 371 | if (0 > sscanf(line, "%4095s %c %lo %40s %40s %lu %lu %lu %lu %lu", path, |
372 | &type, &mode, usr_buf, grp_buf, &major, &minor, &start, | 372 | &type, &mode, usr_buf, grp_buf, &major, &minor, &start, |
373 | &increment, &count)) | 373 | &increment, &count)) |
374 | { | 374 | { |