* read_spec_entry question
@ 2016-10-13 18:59 Roberts, William C
0 siblings, 0 replies; only message in thread
From: Roberts, William C @ 2016-10-13 18:59 UTC (permalink / raw)
To: 'selinux@tycho.nsa.gov'
Should read_spec_entry every return 0 and not have found in entry?
It currently only allocates the entry argument if processing the line occurred in
A way where it found a valid string. It states that on success, it returns 0 and *entry
Is allocated, but it seems that its possible that len is 0 and *entry is never allocated
But it still returns 0.
What should the behavior be?
/*
* Read an entry from a spec file (e.g. file_contexts)
* entry - Buffer to allocate for the entry.
* ptr - current location of the line to be processed.
* returns - 0 on success and *entry is set to be a null
* terminated value. On Error it returns -1 and
* errno will be set.
*
*/
static inline int read_spec_entry(qstr **entry, char **ptr, const char **errbuf)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-10-13 18:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-13 18:59 read_spec_entry question Roberts, William C
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.