ref: 2978db7bc91bfc4a2b402d408fa59499e3ee35be
parent: 69bb519a5e1b70acc9584353a6b1d896d957c969
author: kvik <kvik@a-b.xyz>
date: Mon May 10 09:20:04 EDT 2021
shim: correct the size of status message buffer
--- a/shim.c
+++ b/shim.c
@@ -45,7 +45,7 @@
char done;
int fd;
int pid;
- char status[255+1];
+ char status[ERRMAX];
};
static struct a_fork the_fork[MAXFORKS];
@@ -111,7 +111,7 @@
for(f = 0; f < MAXFORKS; f++){
if(r == the_fork[f].pid){
the_fork[f].done = 1;
- strncpy(the_fork[f].status, status->msg, sizeof(the_fork[f].status));
+ strncpy(the_fork[f].status, status->msg, ERRMAX);
break;
}
}