Skip to content

Commit 4ca5702

Browse files
authored
Merge pull request #3485 from grondo/issue#3482
job-manager: fix compilation error on gcc-10
2 parents 9689726 + 5530db8 commit 4ca5702

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/modules/job-manager/jobtap.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,9 @@ int jobtap_load (struct jobtap *jobtap,
421421
return 0;
422422
error:
423423
if (errp && errp->text[0] == '\0')
424-
strncpy (errp->text, flux_plugin_strerror (p), sizeof (errp->text));
424+
strncpy (errp->text,
425+
flux_plugin_strerror (p),
426+
sizeof (errp->text) - 1);
425427
flux_plugin_destroy (p);
426428
return -1;
427429
}

0 commit comments

Comments
 (0)