[LTP] [PATCH v4] syscalls/prctl05.c: New test for prctl() with PR_{SET, GET}_NAME
Cyril Hrubis
chrubis@suse.cz
Mon May 27 15:41:25 CEST 2019
Hi!
Pushed with minor change, thanks.
...
> + if (strcmp(tc->expname, buf)) {
> + tst_res(TFAIL,
> + "prctl(PR_GET_NAME) failed, expected %s, got %s", tc->expname, buf);
> + return;
> + }
I've changed this strcmp() to strncmp() to avoid undefined behavior in
unlikely case that kernel failed to terminated the buffer.
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list