Skip to content

Commit

Permalink
plugin: fix segfault caused by unpack error
Browse files Browse the repository at this point in the history
Problem: notify_shell_cb() tries to unpack a json object onto
an int, causing stack corruption, and a segfault that was causing
the first test in t0006-notify.t to fail.

Fix unpack format string.

Fixes flux-framework#91
  • Loading branch information
garlick committed Oct 4, 2023
1 parent 908f3bd commit dadf1b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/shell/plugins/notify.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ static void notify_shell_cb (const flux_msg_t *msg, void *arg)
const char *message = NULL;

if (flux_msg_unpack (msg,
"{s:o s:i s:o s:o s:o s:o s:o}",
"{s:i s:i s:o s:o s:o s:o s:o}",
"id", &id,
"status", &status,
"source", &xsource,
Expand Down

0 comments on commit dadf1b0

Please sign in to comment.