1. 24 4月, 2012 1 次提交
    • R
      make dlerror produce informative results · a5d10eb1
      Rich Felker 提交于
      note that dlerror is specified to be non-thread-safe, so no locking is
      performed on the error flag or message aside from the rwlock already
      held by dlopen or dlsym. if 2 invocations of dlsym are generating
      errors at the same time, they could clobber each other's results, but
      the resulting string, albeit corrupt, will still be null-terminated.
      any use of dlerror in such a situation could not be expected to give
      meaningful results anyway.
      a5d10eb1
  2. 23 4月, 2012 4 次提交
  3. 22 4月, 2012 6 次提交
  4. 21 4月, 2012 2 次提交
  5. 20 4月, 2012 3 次提交
  6. 19 4月, 2012 2 次提交
  7. 18 4月, 2012 14 次提交
  8. 17 4月, 2012 8 次提交
    • R
      avoid null pointer dereference on %*p fields in scanf · 03de77f5
      Rich Felker 提交于
      03de77f5
    • R
      also ensure that write buffer is bounded when __stdio_write returns · b7a27617
      Rich Felker 提交于
      assuming other code is correct, this should be a no-op, but better to
      be safe...
      b7a27617
    • R
      fix buffer overflow in vfprintf on long writes to unbuffered files · b5a8b289
      Rich Felker 提交于
      vfprintf temporarily swaps in a local buffer (for the duration of the
      operation) when the target stream is unbuffered; this both simplifies
      the implementation of functions like dprintf (they don't need their
      own buffers) and eliminates the pathologically bad performance of
      writing the formatted output with one or more write syscalls per
      formatting field.
      
      in cases like dprintf where we are dealing with a virgin FILE
      structure, everything worked correctly. however for long-lived files
      (like stderr), it's possible that the buffer bounds were already set
      for the internal zero-size buffer. on the next write, __stdio_write
      would pick up and use the new buffer provided by vfprintf, but the
      bound (wend) field was still pointing at the internal zero-size
      buffer's end. this in turn allowed unbounded writes to the temporary
      buffer.
      b5a8b289
    • R
      fix %lf, etc. with printf · cc3a4466
      Rich Felker 提交于
      the l prefix is redundant/no-op with printf, since default promotions
      always promote floats to double; however, it is valid, and printf was
      wrongly rejecting it.
      cc3a4466
    • R
      better description for errno==0 · 9d2a15a6
      Rich Felker 提交于
      9d2a15a6
    • R
      implement wcstod and family · f94cbdeb
      Rich Felker 提交于
      not heavily tested but these functions appear to work correctly
      f94cbdeb
    • R
      avoid hitting eof in wcstol · a4310aa2
      Rich Felker 提交于
      shunget cannot unget eof status, causing wcstol to leave endptr
      pointing to the wrong place when scanning, for example, L"0x". cheap
      fix is to make the read function provide an infinite stream of bogus
      characters rather than eof. really this is something of a design flaw
      in how the shgetc system is used for strto* and wcsto*; in the long
      term, I believe multi-character unget should be scrapped and replaced
      with a function that can subtract from the f->shcnt counter.
      a4310aa2
    • R