core: avoid NULL derefrence in grub_divmod64s

It can be called with NULL for third argument.  grub_divmod32* for
now are called only from within wrappers, so skip check.

Reported-By: Michael Zimmermann <sigmaepsilon92@gmail.com>
This commit is contained in:
Andrei Borzenkov 2015-04-06 19:25:02 +03:00
parent 12bf557039
commit f11db3c7fc

View file

@ -50,6 +50,7 @@ grub_divmod64s (grub_int64_t n,
q = -q;
}
/* Now: n = d * q + r */
if (ro)
*ro = r;
return q;
}