qrexec-agent: pass an int pointer to sscanf to match %d

and check for 16 bit unsigned range after that.
This commit is contained in:
Vincent Penquerc'h 2013-12-28 11:11:26 -05:00 committed by Marek Marczykowski-Górecki
parent 4823490e70
commit c14f810067

View File

@ -84,7 +84,7 @@ void init()
void wake_meminfo_writer() { void wake_meminfo_writer() {
FILE *f; FILE *f;
pid_t pid; int pid;
if (meminfo_write_started) if (meminfo_write_started)
/* wake meminfo-writer only once */ /* wake meminfo-writer only once */
@ -101,6 +101,10 @@ void wake_meminfo_writer() {
} }
fclose(f); fclose(f);
if (pid <= 1 || pid > 0xffff) {
/* check within acceptable range */
return;
}
kill(pid, SIGUSR1); kill(pid, SIGUSR1);
meminfo_write_started = 1; meminfo_write_started = 1;
} }