gecko/modules
Matt Howell 6cb0443581 Bug 1209551 - Don't read past the end of a buffer in libmar
The index section of a MAR archive file contains several fixed-length fields
and also variable-length names for each file in the archive, terminated by a
null byte. Since that makes the length of the index variable, the length of the
entire index is also provided in the file.
When libmar opens a file, it allocates a buffer with the length given in the
file and reads the index from the file into that buffer.
mar_consume_index() then parses the entire index from that copy,
trying to make sure it doesn't read past the buffer it was given.

The length of the buffer is given to mar_consume_index()
by providing it a pointer to one byte past the end of the buffer.
However, mar_consume_index() treats this pointer as pointing *to* the end.
Therefore, it is possible for a malformed MAR file (one where the stated length
is less than the real length) to trigger a read of one byte beyond the
allocated memory.

Fix this by failing the parse when we reach the buffer end pointer minus one,
instead of when we reach that address itself.
2015-10-06 09:11:43 -07:00
..
brotli bug 1207298 - update brotli library r=jfkthame 2015-09-28 13:10:09 -04:00
freetype2
libbz2
libjar Backed out changeset 91d4539e00ce (bug 1207245) 2015-10-07 10:19:19 -07:00
libmar Bug 1209551 - Don't read past the end of a buffer in libmar 2015-10-06 09:11:43 -07:00
libpref Bug 1210033 - Add on-screen keyboard diagnostic information to about:support. r=masayuki r=felipe 2015-10-08 11:51:47 -04:00
zlib Bug 1202099 - Fix a clang 3.7 build warning (treated as error) in zlib 2015-09-08 09:46:26 -04:00