Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Tue, 27 Sep 2011 20:06:46 +0400
From: Vasiliy Kulikov <>
To: musl <>
Subject: musl bugs

Hi Rich,

- fgets() should be checked for too small buffer.
- Looks like fgets() may fail.  Then ferror() should be used together
  with feof().

- Is linebuf[256] big enough?  IMO as the buffer is not supplied by a
  user, it should be dynamically allocated.  Calling getmntent() and
  getting truncated result/ERANGE is somewhat not expected.

- Here fseek() can be easily checked for errors => return 1 in case of

- Implementation is wrong.  The argument is not a substring, but a
  single option, possibly with "=value".  Glibc's implementation is OK

prctl() and other places:
- Why no va_end()?  It is __builtin_va_end() sometimes, and AFAIU it is
  not a noop.

getgrgid() and getgrnam():
- errno is not saved while calling endgrent() (close() inside).  POSIX
  says close() may return EIO if I/O error happened during close() with
  RO fd, altering errno.

- As the code chooses the first possible path in $PATH, the
  /usr/local/bin should be the last path.  POSIX says it should start
  with null path (current dir), but it is crazy.
- I don't see an overflow here (comment claims so)...


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.