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 5308b8d commit 8b1069cCopy full SHA for 8b1069c
runtime/debug.c
@@ -125,15 +125,14 @@ static int parse_alert_level_csv(const char *const alert_csv) {
125
126
// strtok modifies the passed in string, so copy alert_csv and use
127
// the copy instead
128
- char *alert_csv_cpy = malloc(csv_len + 1);
+ char *alert_csv_cpy = strdup(alert_csv);
129
if (!alert_csv_cpy) {
130
// Non-critical error, so just print a warning
131
fprintf(stderr, "Cilk: unable to copy CILK_ALERT settings (%s)\n",
132
strerror(errno)
133
);
134
return alert_level;
135
}
136
- strcpy(alert_csv_cpy, alert_csv);
137
138
char *alert_str = strtok(alert_csv_cpy, ",");
139
0 commit comments