Index: media/libnestegg/moz.yaml =================================================================== --- media/libnestegg/moz.yaml +++ media/libnestegg/moz.yaml @@ -7,12 +7,12 @@ origin: name: nestegg description: "WebM demuxer" url: https://github.com/mozilla/nestegg license: ISC - release: 405fdae0802b9d6aa0c7937dbc660da197164980 (2026-04-23T08:20:19+12:00). - revision: 405fdae0802b9d6aa0c7937dbc660da197164980 + release: 1c9936b171b7e37efce87f7af247c7af0e3ea5b8 (2026-06-11T21:07:37Z). + revision: 1c9936b171b7e37efce87f7af247c7af0e3ea5b8 vendoring: url: https://github.com/mozilla/nestegg source-hosting: github vendor-directory: media/libnestegg Index: media/libnestegg/src/nestegg.c =================================================================== --- media/libnestegg/src/nestegg.c +++ media/libnestegg/src/nestegg.c @@ -1024,17 +1024,15 @@ ne_read_uint(ne_io * io, uint64_t * val, uint64_t length) { unsigned char b; int r; - if (length == 0 || length > 8) + if (length > 8) return -1; - r = ne_io_read(io, &b, 1); - if (r != 1) - return r; - *val = b; - while (--length) { + + *val = 0; + while (length--) { r = ne_io_read(io, &b, 1); if (r != 1) return r; *val <<= 8; *val |= b; @@ -1050,10 +1048,15 @@ r = ne_read_uint(io, &uval, length); if (r != 1) return r; + if (length == 0) { + *val = 0; + return 1; + } + if (length < sizeof(int64_t)) { base = 1; base <<= length * 8 - 1; if (uval >= base) { base = 1; @@ -1085,17 +1088,18 @@ } f; double d; } value; int r; - /* Length == 10 not implemented. */ - if (length != 4 && length != 8) + if (length != 0 && length != 4 && length != 8) return -1; r = ne_read_uint(io, &value.u, length); if (r != 1) return r; - if (length == 4) + if (length == 0) + *val = 0.; + else if (length == 4) *val = value.f.f; else *val = value.d; return 1; }