libgimpbase: use g_try_new0() when allocating the parameters.
Basically the number of parameters comes from plug-ins which could write whatever crap on the wire. I had a case (playing with Python plug-ins) where GIMP tried to allocate insane amount of parameters. This is bad as it allows third-party plug-ins to crash GIMP core. Instead only *try* to allocate, then return as though there were no parameters if allocation fails. I also print some info on stderr, but don't output WARNING/CRITICAL (this is not a core error, but a plug-in error). Fixes: > GLib-ERROR **: 16:30:23.357: gmem.c:135: failed to allocate 187186442160 bytes
Showing with 15 additions and 1 deletion