Corrected a NULL pointer dereference that logic dictates would never happen, but now it is guarded against. clang-based static analysis was used to identify this issue.
Fixed a static-analysis identified issue where malloc was called to allocate 0 bytes.  This may cause a problem on some systems.
Addressed a bug I introduced when fixing a previous one.
Actually fixed bug that I thought I already fixed. I think.
Accept Ward's clang(1) changes after editing
Merge branch 'WardF-master'