From: Eric Bollengier Date: Fri, 18 Jun 2021 08:30:02 +0000 (+0200) Subject: mssql: Fix #7777 About 'Create database Plugin Object record' error X-Git-Tag: Release-11.3.2~484 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2150a9a9c203a719c91436a984cb54dc4526bea4;p=thirdparty%2Fbacula.git mssql: Fix #7777 About 'Create database Plugin Object record' error --- diff --git a/bacula/src/cats/cats.c b/bacula/src/cats/cats.c index 3c40dcdc2..aa0fe9d06 100644 --- a/bacula/src/cats/cats.c +++ b/bacula/src/cats/cats.c @@ -225,12 +225,16 @@ bool OBJECT_DBR::parse_plugin_object_string(char **obj_str) tmp = get_next_tag(obj_str); if (tmp) { - ObjectSize = str_to_uint64(tmp); + uint64_t val = str_to_uint64(tmp); + ObjectSize = (val > 9223372036854775808ULL /*2^63 */) ? 0 : val; + } else if (*obj_str) { /* Object size is the last tag here, we are not expecting to have status in the stream */ - ObjectSize = str_to_uint64(*obj_str); + uint64_t val = str_to_uint64(*obj_str); + ObjectSize = (val > 9223372036854775808ULL /*2^63 */) ? 0 : val; ret = true; goto bail_out; + } else { goto bail_out; }