X-Git-Url: https://git.saurik.com/apple/libc.git/blobdiff_plain/5f1254882f242514d4ceaf1ecebb140dcc2a511d..2be56ee90c5c5bee77895b8787a43e894249002b:/posix1e/acl_translate.c?ds=sidebyside diff --git a/posix1e/acl_translate.c b/posix1e/acl_translate.c index 3a06fff..2d400f6 100644 --- a/posix1e/acl_translate.c +++ b/posix1e/acl_translate.c @@ -249,7 +249,6 @@ static struct { /* * reallocing snprintf with offset */ - static int raosnprintf(char **buf, size_t *size, ssize_t *offset, char *fmt, ...) { @@ -699,8 +698,8 @@ acl_to_text(acl_t acl, ssize_t *len_p) } } } - buf[(*len_p)++] = '\n'; - buf[(*len_p)] = 0; + + if(!raosnprintf(&buf, &bufsize, len_p, "\n")) goto err_nomem; return buf; err_nomem: