Skip to content
Snippets Groups Projects
  1. Feb 28, 2017
  2. Nov 23, 2016
  3. Oct 17, 2016
    • Greg Kurz's avatar
      bc70a592
    • Li Qiang's avatar
      9pfs: allocate space for guest originated empty strings · ba42ebb8
      Li Qiang authored
      
      If a guest sends an empty string paramater to any 9P operation, the current
      code unmarshals it into a V9fsString equal to { .size = 0, .data = NULL }.
      
      This is unfortunate because it can cause NULL pointer dereference to happen
      at various locations in the 9pfs code. And we don't want to check str->data
      everywhere we pass it to strcmp() or any other function which expects a
      dereferenceable pointer.
      
      This patch enforces the allocation of genuine C empty strings instead, so
      callers don't have to bother.
      
      Out of all v9fs_iov_vunmarshal() users, only v9fs_xattrwalk() checks if
      the returned string is empty. It now uses v9fs_string_size() since
      name.data cannot be NULL anymore.
      
      Signed-off-by: default avatarLi Qiang <liqiang6-s@360.cn>
      [groug, rewritten title and changelog,
       fix empty string check in v9fs_xattrwalk()]
      Signed-off-by: default avatarGreg Kurz <groug@kaod.org>
      ba42ebb8
  4. Sep 16, 2016
  5. Jul 12, 2016
  6. Jul 01, 2016
  7. Jun 07, 2016
  8. Jun 06, 2016
  9. Mar 16, 2016
  10. Feb 23, 2016
  11. Feb 11, 2016
  12. Jan 29, 2016
  13. Jan 26, 2016
  14. Jan 22, 2016
  15. Jan 08, 2016
  16. Nov 30, 2015
  17. Sep 11, 2015
  18. Jun 16, 2015
  19. Mar 19, 2015
  20. Mar 16, 2015
  21. Feb 10, 2015
  22. Apr 28, 2014
  23. Mar 04, 2014
  24. Feb 26, 2014
  25. Jul 09, 2013
  26. May 12, 2013
  27. Jan 30, 2013
  28. Jan 26, 2013
  29. Jan 12, 2013
Loading