https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=193235

            Bug ID: 193235
           Summary: basename(3) potentially failing with ENOMEM, etc is
                    not documented
           Product: Documentation
           Version: Latest
          Hardware: Any
                OS: Any
            Status: Needs Triage
          Severity: Affects Some People
          Priority: ---
         Component: Documentation
          Assignee: [email protected]
          Reporter: [email protected]

basename(3) creates a static buffer for storing paths. This libcall can fail if
malloc fails however, and this potential failure isn't documented in the
manage:

68 char *
69 basename(const char *path)
70 {
71         static char *bname = NULL;
72 
73         if (bname == NULL) {
74                 bname = (char *)malloc(MAXPATHLEN);
75                 if (bname == NULL)
76                         return (NULL);
77         }

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-doc
To unsubscribe, send any mail to "[email protected]"

Reply via email to