We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 95d1e3d commit b6edf57Copy full SHA for b6edf57
src/dispatchers/cdl_header_parser.c
@@ -411,7 +411,7 @@ int parse_attr(char **bptr,
411
*bptr += strlen(line) + 1;
412
while (**bptr == '\n') (*bptr)++;
413
414
- strcpy(line_cpy, line);
+ strncpy(line_cpy, line, LINE_SIZE-1);
415
416
prefix_len = strspn(line_cpy, " \t");
417
key = line_cpy + prefix_len;
@@ -499,7 +499,7 @@ int parse_vars(char **bptr,
499
500
501
502
- strncpy(orig_line, line, LINE_SIZE);
+ strncpy(orig_line, line, LINE_SIZE-1);
503
504
prefix_len = strspn(line, " \t");
505
line += prefix_len;
0 commit comments