Patch to context_new to set errno to EINVAL on bad values
libselinux/src/context.c +2 -0
@@ -22,6 +22,7 @@ typedef struct {context_t context_new (const char *str) {int i, count; + errno =0 ;context_private_t *n = (context_private_t *)malloc (sizeof (context_private_t));context_t result = (context_t )malloc (sizeof (context_s_t));
@@ -76,6 +77,7 @@ context_t context_new(const char *str) }return result; err: +if (errno ==0 ) errno =EINVAL ;context_free (result);return 0 ; }
Merged in libselinux-2.0.94
Quoted 1 line · Daniel J Walsh
--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.