Skip to content
Snippets Groups Projects
  1. Aug 24, 2017
    • Jonathan Wilkes's avatar
      get rid of undefined behavior in union member mismatch for $@ · 9d30a7cd
      Jonathan Wilkes authored
      The code for $@ depends on reading a_w.w_symbol values, but the other
      A_DOLLAR branch (i.e., for $1 - $n) depend on reading a_w.w_index.
      
      So for the conditional at the top of binbuf_eval, this means that any
      normal A_DOLLAR that has its a_w.w_index set is actually trying to read
      a_w.w_symbol. On a 64-bit arch with certain compilers, this will result
      in a read of uninitalized data in the padding of the part of w_symbol
      that exceeds the sizeof(int).
      
      The workaround here is to define a sentinel value DOLLARALL to a negative
      int unlikely to ever be used in real A_DOLLAR values. We then use DOLLARALL
      to mean the "@" in "$@" so we can create a special branch for it in the
      parser.
      
      One consequence-- we probably need to add a special case error when
      this value is out of range. So rather than confusing the user with the
      mysterious negative value of DOLLARALL we print "$@" for them. (Currently,
      the only place I can see this happening is when "$@" is used as the
      target for a Pd message.)
      9d30a7cd
  2. Jul 09, 2017
  3. Jul 02, 2017
  4. Mar 22, 2017
  5. Aug 25, 2016
    • Jonathan Wilkes's avatar
      port from Pd Vanilla (some of these were already ported): 5a1b58 · d7ccb9db
      Jonathan Wilkes authored
      These bugs were discovered via static code-analysis
      https://scan.coverity.com/projects/pure-data-pure-data
      (The CID numbers are the "Coverity IDs" used to identify the various bugs)
      
      - Don't free binbuf within glist_readfrombinbuf (CID:74871)
      - it must be deleted by the caller
      - Initialize sockaddr_in (CID:74861,74862,74863,74866)
      - Initialize indelay/outdelay (CID:74864,74865)
      - Initialize device-arrays (CID:74853,74854,74855,74856)
      - Closing unneeded sockets (CID:74827)
      - Initialize sockaddr_in (CID:74860}
      - Close file-descriptor if the soundfile is unparsable (CID:74822,74823)
      - Close file-handle in cleanup (CID:74816)
      - Call va_end() when handling variadic args (CID:74872)
      - Added missing break (CID:74800)
      - Prevent NULL-dereferences (CID:74792,74793)
      - Size checks when copying into string buffers (CID:74844,74845,74846,74847,74849)
      - Freeing no-more used storage (CID:74832)
      - Fixed code block (CID:74806)
      - Initialize sockaddr_in (CID:74860)
      - Initialize array-values to 0 (CID:74867)
      - Free allocated memory (CID:74813,74830)
      - Removed allocation of unused memory
      - Use pd_free() to free templates (CID:74814)
      - template_free() does not free the entire structure (it misses the pd_new() part)
      - initialize variable (CID:77865)
      - Prevent NULL-pointer dererencing (CID:77864)
      - Free heap-allocate binbuf after use (CID:74833)
      d7ccb9db
  6. Jun 03, 2016
  7. May 23, 2015
  8. Sep 02, 2014
  9. Aug 03, 2014
  10. Jun 16, 2014
  11. Aug 20, 2013
  12. Mar 26, 2013
  13. Mar 16, 2013
  14. Jan 21, 2013
  15. Dec 15, 2012
  16. Nov 18, 2012
  17. Nov 16, 2012
  18. Aug 08, 2012
  19. Aug 04, 2012
  20. Nov 11, 2011
  21. Nov 02, 2011
  22. Oct 30, 2011
  23. Jan 13, 2009
  24. Aug 13, 2008
  25. Dec 18, 2007
  26. Dec 13, 2007
  27. Aug 01, 2007
Loading