Matt Howell
22e7297afd
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.
--HG--
extra : amend_source : 3001a5bc08e790251759418e014bbd7153b66d8a
2015-10-06 09:11:43 -07:00
Nicholas Nethercote
419069a3b4
Bug 1202971 (part 1) - Fix compile warnings in libmar. r=rstrong.
...
Also remove ALLOW_COMPILER_WARNINGS=True so they don't come back.
--HG--
extra : rebase_source : fceb154a2c73ee34696cf4e24393182cf27b99e8
2015-09-15 17:39:11 -07:00
Nicholas Nethercote
f44287005f
Bug 1198334 (part 1) - Replace the opt-in FAIL_ON_WARNINGS with the opt-out ALLOW_COMPILER_WARNINGS. r=glandium.
...
The patch removes 455 occurrences of FAIL_ON_WARNINGS from moz.build files, and
adds 78 instances of ALLOW_COMPILER_WARNINGS. About half of those 78 are in
code we control and which should be removable with a little effort.
--HG--
extra : rebase_source : 82e3387abfbd5f1471e953961d301d3d97ed2973
2015-08-27 20:44:53 -07:00
Stephen Pohl
de219632ca
Bug 1184500: Improve handling of index names in MAR files. r=rstrong
...
--HG--
extra : commitid : C2RlzuAzH0w
2015-07-18 18:42:15 -07:00
Brian Smith
6a474042e5
Bug 903135 - Updates to libmar needed to support B2G MAR signature verification. r=bbondy
2014-10-22 21:00:15 -04:00
Mike Hommey
ed70c5f377
Bug 1041941 - Use templates for programs, simple programs, libraries and C++ unit tests. r=gps
2014-09-03 14:10:54 +09:00
Shashank Sabniveesu
903c685d53
Bug 1021142 - 'fclose()' at 2 places to avoid leaks on failure. r=bbondy
2014-08-28 11:35:50 -07:00
Chris Peterson
efce97687f
Bug 995655 - Fix -Wpointer-sign warnings in libmar. r=rstrong
2013-12-16 16:55:53 -08:00
Ehsan Akhgari
b7b6d52aef
Bug 970745 - Move USE_STATIC_LIBS to moz.build; r=glandium
2014-02-11 09:12:33 -05:00
Ehsan Akhgari
a4c3a2ef68
Bug 947735 - Build modules/libmar/ in unified mode; r=bbondy
2013-12-09 13:30:27 -05:00
Mike Hommey
e80e877ab7
Bug 939044 - Remove most definitions of MODULE. r=mshal
2013-11-19 11:47:39 +09:00
Cykesiopka
d2f6b7333c
Bug 914270 - Part 1: Simple/Automated moves. r=joey
2013-10-24 18:51:00 +01:00
Mike Hommey
b000a846c2
Bug 929905 - Consolidate sources in moz.build. r=gps
2013-10-25 08:23:05 +09:00
Mike Hommey
f8bc7fa754
Bug 912293 - Remove now redundant boilerplate from Makefile.in. r=gps
2013-09-05 09:01:46 +09:00
Ms2ger
04a948975a
Bug 906619 - Part a: Move unconditional CSRCS to moz.build; r=mshal
2013-08-22 08:56:02 +02:00
Mike Shal
8d75be459f
Bug 904768 - Print filename when failing to open files in libmar; r=netzen
2013-08-13 15:18:03 -04:00
Ehsan Akhgari
853dd82f0f
Bug 895322 - Part 4: Only use MOZ_STATIC_ASSERT in mar.h when we're compiling C code; r=Waldo
...
--HG--
extra : rebase_source : 9180550b66311f339e9ea46546aa75cab3d8c92b
2013-07-18 14:36:39 -04:00
Ehsan Akhgari
ef4b479714
Bug 872127 - Part 2: Replace mozilla/StandardInteger.h with stdint.h; r=Waldo,ted
2013-07-30 10:25:31 -04:00
Brian R. Bondy
c945912fd6
Bug 890853. r=rstrong.
2013-07-22 22:35:20 -04:00
Brian O'Keefe
11bcc1cd9e
Bug 875934 - Move LIBRARY_NAME to moz.build (batch #1 ); r=mshal
...
--HG--
extra : rebase_source : 385d3fd65475ffc18ee44ae088753649470e214b
2013-06-17 15:21:01 -04:00
Joey Armstrong
dbbef415ed
bug 872087: mozbuild HOST_LIBRARY_NAME conversion cleanup. r=gps
2013-06-19 09:19:25 -04:00
Joey Armstrong
ac2232fc29
bug 875549: mozbuild cleanup for HOST_CSRCS. r=gps
2013-06-18 09:10:50 -04:00
Joey Armstrong
ccea9f9d5e
bug 875549: move HOST_CSRCS to mozbuild (file batch #1 ). r=mshal
2013-06-11 11:31:11 -04:00
Joey Armstrong
722eab8a6b
bug 872087: move HOST_LIBRARY to moz.build (file batch #1 ). r=mshal
2013-06-10 12:21:32 -04:00
Mike Shal
df7deac25b
Bug 846634 - Part 2: Move EXPORTS to moz.build; r=joey
2013-04-16 15:24:43 -04:00
Kyle Machulis
72a717a860
Bug 855465 - Add emacs python mode comments to moz.build files; r=gps
2013-04-01 11:36:59 -07:00
Kyle Machulis
43628a7867
Backout for changeset 03452b187c14 (Bug 855465) due to bustage on a CLOSED TREE; r=qdot
2013-03-29 15:12:58 -07:00
Kyle Machulis
334c0800cf
Bug 855465 - Add emacs python mode comments to moz.build files; r=gps
...
--HG--
extra : rebase_source : 004a756492323e1a049586e85b3be5037159df20
2013-03-29 13:56:18 -07:00
Mike Shal
7ecea60097
Bug 844654 - Part 2: Move MODULE to moz.build; rs=gps
2013-03-19 11:47:00 -07:00
Gregory Szorc
3416b992a8
Bug 784841 - Part 18y: Convert /modules; r=glandium
2013-02-25 12:47:23 -08:00
Mike Hommey
efce124035
Bug 838165 - Cleanup in NSPR hooking in the build system. r=ted
2013-02-14 08:25:43 +01:00
Nathan Froyd
348797d9b2
Bug 798564 - remove prtypes.h #includes in modules/libmar/; r=ehsan
2013-01-23 16:36:59 -05:00
Trevor Saunders
2a624f853c
backout an accidental change that landed with bug 817133
2012-12-05 20:35:09 -05:00
Trevor Saunders
496f01cda1
bug 817133 - move platform init and shutdown stuff out of nsAccessNodeWrap and ApplicationAccessibleWrap static methods r=surkov
2012-12-01 19:58:25 -05:00
Brian R. Bondy
5cc09309d8
Bug 798415 - Import signature to MAR files implementation. r=bsmith
2012-10-17 09:39:44 -04:00
Brian R. Bondy
39483bb578
Bug 798413 - Export signature from MAR files implementation. r=bsmith
2012-10-17 09:39:44 -04:00
Brian R. Bondy
f171dd7d09
Bug 792452 - Base implementation for multiple signing and verifying. r=bsmith
2012-10-17 09:39:44 -04:00
Ehsan Akhgari
845651448b
Bug 579517 - Part 5: Add missing StandardInteger.h #includes where needed; r=bsmedberg
...
Landing on a CLOSED TREE
2012-08-08 17:08:17 -04:00
Ehsan Akhgari
e368dc9c85
Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg
...
This patch was generated by a script. Here's the source of the script for
future reference:
function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
! -wholename "*security/nss*" \
! -wholename "*/.hg*" \
! -wholename "obj-ff-dbg*" \
! -name nsXPCOMCID.h \
! -name prtypes.h \
-type f \
\( -iname "*.cpp" \
-o -iname "*.h" \
-o -iname "*.c" \
-o -iname "*.cc" \
-o -iname "*.idl" \
-o -iname "*.ipdl" \
-o -iname "*.ipdlh" \
-o -iname "*.mm" \) | \
xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}
convert PRInt8 int8_t
convert PRUint8 uint8_t
convert PRInt16 int16_t
convert PRUint16 uint16_t
convert PRInt32 int32_t
convert PRUint32 uint32_t
convert PRInt64 int64_t
convert PRUint64 uint64_t
convert PRIntn int
convert PRUintn unsigned
convert PRSize size_t
convert PROffset32 int32_t
convert PROffset64 int64_t
convert PRPtrdiff ptrdiff_t
convert PRFloat64 double
2012-08-22 11:56:38 -04:00
Mike Hommey
70d7c821af
Bug 774032 bonus - Use @DEPTH@ and @relativesrcdir@ in Makefile.in. r=ted
2012-08-04 20:26:44 +02:00
Gervase Markham
82ff7027aa
Bug 716478 - update licence to MPL 2.
2012-05-21 12:12:37 +01:00
Nathan Froyd
a8ef5def92
Bug 739958 - fix compiler warnings in libmar; r=bbondy
2012-03-28 09:03:17 -04:00
Brian R. Bondy
ccf07f422d
Bug 720688 - Ability to strip MAR signatures in libmar. r=rstrong
2012-02-24 16:29:42 -05:00
Brian R. Bondy
80084f79ea
Bug 708690 - libmar enhancements for product information blocks. r=rstrong
2012-02-24 16:29:41 -05:00
Brian R. Bondy
3458244776
Bug 699700 - Add support for signing and verifying MAR files in libmar and the mar program. r=bsmith
2012-02-24 16:29:41 -05:00
Ed Morley
370527db8c
Bug 655039 - Remove WinCE code from libmar; r=rstrong
2011-05-05 17:14:43 -04:00
Justin Dolske
1d8f4e8f5b
Bug 533665 - Avoid the need to build NSPR for L10N repacks. r=robert.bugzilla a192=beltzner
2009-12-09 14:59:37 -08:00
Hiroyuki Ikezoe
2aba70ec42
Bug 488807 - Should close the handle of FindFirstFile. r=blassey, sr=bsmedberg
2009-06-15 11:58:25 +02:00
Brad Lassey
522ce46286
Bug 479382 - libmar doesn't build on windows ce (uses posix file io); r=benjamin
2009-03-15 14:59:59 +01:00
benjamin@smedbergs.us
12691cf4ab
Bug 410485 - Windows updater broken from bug 396052, r=luser
2008-01-02 10:05:01 -08:00