storage: check that the string isn't empty before splitting
authorRoss Burton <ross.burton@intel.com>
Wed, 18 Jul 2012 09:37:38 +0000 (10:37 +0100)
committerDaniel Wagner <daniel.wagner@bmw-carit.de>
Wed, 18 Jul 2012 09:52:16 +0000 (11:52 +0200)
commitc28f8256ca105da2d3b1f47a3a348fa47e7d89c6
tree448eae14222a70326f41ef9cd96b64bca5175c70
parent13f39a7a5b21c7088d584e015f44cad88def279b
storage: check that the string isn't empty before splitting

If the string was non-NULL but empty (str="\0"), the following \0 assignment
would write to str[-1] and thus cause memory corruption.

On PPC and MIPS, this was causing crashes in glibc.
src/storage.c