Bug 13028: Resolve uninitialized value in string eq at cmp_sysprefs.pl line 194
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Mon, 6 Oct 2014 12:09:53 +0000 (14:09 +0200)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Thu, 30 Oct 2014 03:24:00 +0000 (00:24 -0300)
commit98a3aa4d8ff816fe2d51f7f148f14438ea8db4e0
tree63a81bec3db58675820bd712bedc54b7c98719d5
parent4f6d1c7ae2e6b3f03a5d1ecc05bda67c9789873c
Bug 13028: Resolve uninitialized value in string eq at cmp_sysprefs.pl line 194

If you use the restore option with a partial pref file not containing a version, you will have this error. Also the count of updated prefs will be one too high.

This is corrected by a better test of the hash value in the CheckVersionPref subroutine.

Test plan:
[1] Create a small pref file and remove the version pref (if present). You
could for instance do a pref backup and remove most lines.
[2] Use the restore option with and without this patch.
    So, something like:
        maintclone/misc/maintenance/cmp_sysprefs.pl -c r -f 9999crucial.pref
[3] Check on the error message and the pref count.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
misc/maintenance/cmp_sysprefs.pl