util: Avoid possible NULL dereference in virSysinfoParsePPCProcessor
util: Avoid possible NULL dereference in virSysinfoParsePPCProcessor

Found by Coverity. Because there's an "if ((cur = strstr(base, "revision"))
 != NULL) {" followed by a "base = cur" coverity notes that 'base' could
then be NULL causing the return to the top of the "while ((tmp_base =
strstr(base, "processor")) != NULL) {" to have strstr deref a NULL 'base'
pointer because the setting of base at the bottom of the loop is unconditional.

Alter the code to set "base = cur" after processing each key. That will
"ensure" that base doesn't get set to NULL if both "cpu" and "revision"
do no follow a "processor".

While a /proc/cpuinfo file that has a "processor" key but with neither
a "cpu" nor a "revision" doesn't seem feasible, the code is written as if
it could happen, so we have to account for it.

Signed-off-by: John Ferlan <87558058f6f829e5ec976c8ef960720af4ff9c7d@redhat.com>

fabianfreyer/libvirt,crobinso/libvirt,fabianfreyer/libvirt,VenkatDatta/libvirt,crobinso/libvirt,jfehlig/libvirt,nertpinx/libvirt,zippy2/libvirt,jardasgit/libvirt,VenkatDatta/libvirt,nertpinx/libvirt,fabianfreyer/libvirt,nertpinx/libvirt,olafhering/libvirt,andreabolognani/libvirt,libvirt/libvirt,jardasgit/libvirt,crobinso/libvirt,nertpinx/libvirt,VenkatDatta/libvirt,crobinso/libvirt,datto/libvirt,eskultety/libvirt,datto/libvirt,zippy2/libvirt,libvirt/libvirt,olafhering/libvirt,jfehlig/libvirt,fabianfreyer/libvirt,jardasgit/libvirt,andreabolognani/libvirt,andreabolognani/libvirt,VenkatDatta/libvirt,libvirt/libvirt,jfehlig/libvirt,eskultety/libvirt,eskultety/libvirt,nertpinx/libvirt,andreabolognani/libvirt,jardasgit/libvirt,datto/libvirt,datto/libvirt,eskultety/libvirt,eskultety/libvirt,zippy2/libvirt,olafhering/libvirt,jfehlig/libvirt,zippy2/libvirt,VenkatDatta/libvirt,libvirt/libvirt,jardasgit/libvirt,datto/libvirt,fabianfreyer/libvirt,andreabolognani/libvirt,olafhering/libvirt