Граф коммитов

184 Коммитов

Автор SHA1 Сообщение Дата
Ian Moody 17422d41ac Bug 1539176 - modules/ manual ESLint no-throw-literal fixes. r=rstrong
Differential Revision: https://phabricator.services.mozilla.com/D25651

--HG--
extra : moz-landing-system : lando
2019-04-02 13:41:10 +00:00
Mark Banner dba6983e75 Bug 1415265 - Remove now unnecessary .eslintrc.js files or entries. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D23850

--HG--
extra : moz-landing-system : lando
2019-03-28 09:38:14 +00:00
Ya'ar Hever 531ae2db82 Bug 1501932 - Enable ESLint for modules/ (automatic changes). r=njn,aklotz
Differential Revision: https://phabricator.services.mozilla.com/D14645

--HG--
extra : moz-landing-system : lando
2019-02-15 20:03:05 +00:00
Robert Strong 954bce564e Bug 1514532 - followup comment format fix. r=me 2018-12-17 11:43:11 -08:00
Robert Strong 6468b181f7 Bug 1514532 - the modules/libmar directory isn't clang formatted and there are a few deprecation warnings in app update code. r=mhowell
Added defines to mar_extract.c, mar_read.c, bsdiff.c so they use the ISO C and C++ conformant name.
Ran clang format on bspatch.cpp and the files under modules/libmar except for nss_secutil.c and nss_secutil.h since they are copies of nss code.
2018-12-17 11:17:21 -08:00
June Wilde 3dba77a779 Bug 1468556 - Protect against overlapping files in libmar; r=mhowell
Disallows files from referencing the same bytes in the content blocks of a MAR
file by storing a list of structs containing a file's byte offsets and lengths.
A list was chosen since the cap of 256 files wouldn't produce considerable
overhead when extracting/reading/searching/etc through the archive.

Removing the ability for a MAR file to reference the same content block
repeatedly seems like a better solution than what was suggested in the BLRG
report. (limiting the number of files or checking for overly large
decompressed files)

Allows us to prohibit this type of file bomb while only losing an attribute
of the MAR file format that wasn't being leveraged. The fix is applied in
mar_enum_items and mar_find_item so that the manifest the updater uses is
equally safeguarded as the mar host tool.

Differential Revision: https://phabricator.services.mozilla.com/D11706

--HG--
extra : moz-landing-system : lando
2018-11-26 17:25:24 +00:00
June Wilde 337c696973 Bug 1468542 - Restrict acceptable bounds for i in nss_secutil; r=rstrong
Summary:
Adds some missing braces on if structures
Adds a check for i being larger or equal to nb

Reviewers: rstrong

Reviewed By: rstrong

Bug #: 1468542

Differential Revision: https://phabricator.services.mozilla.com/D12193

--HG--
extra : rebase_source : 51a99f5376ed8877162e82b6c15f147df81981f8
2018-11-19 20:57:50 +02:00
June Wilde 64fa52c710 Bug 1468544 - Replace mar_hash_name with CityHash algorithm. r=rstrong
Make CityHash64, CityHash64WithSeed, and CityHash64WithSeeds usable from C code
Remove unnecessary includes from mar_read.c as well
Add DisableStlWrapping to mar tool's moz.build to fix linkage break when
building in Windows with MSVC

Differential Revision: https://phabricator.services.mozilla.com/D10774
2018-11-06 13:34:21 -05:00
June Wilde cc0933a625 Bug 1468539 - Limit libmar from reading more than a single Additional_Section. r=mhowell
Only a single type of additional block has ever been defined for the MAR
archive format and only a single block of that type is needed per file.
Limiting ourselves to reading only that until we define more seems
sensible.

Move additionalBlockSize check before first fread
Add MAXADDITIONALBLOCKSIZE as a constant for checking block sizes

Differential Revision: https://phabricator.services.mozilla.com/D10797
2018-11-05 21:29:42 -05:00
Mark Banner a26105ff45 Bug 1501662 - Add more .eslintrc.js files for test directories (dom, modules, netwerk and parser). r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D9661

--HG--
extra : moz-landing-system : lando
2018-10-24 19:11:17 +00:00
Alex Gaynor c60557350c Bug 1497937 - fixed a deprecation warning due to including an older header; r=rstrong
Differential Revision: https://phabricator.services.mozilla.com/D8561

--HG--
extra : moz-landing-system : lando
2018-10-23 16:47:30 +00:00
June Wilde 6b5c6e91be Bug 1458129 - Prevent double free in mar_sign.c. r=rstrong
Differential Revision: https://phabricator.services.mozilla.com/D8924
2018-10-18 13:29:08 -04:00
Sylvestre Ledru aa37bde79b Bug 1489454 - Remove all trailing whitespaces (again) r=Ehsan
This also includes moving some files to the regular format.

Differential Revision: https://phabricator.services.mozilla.com/D5249

--HG--
extra : moz-landing-system : lando
2018-09-07 14:47:51 +00:00
Matt Howell 3eedff1868 Bug 1473113 - Defer initializing the MAR index until it's needed. r=rstrong
--HG--
extra : source : 6ea6dde8422f745f10dbc004293d1c1bc96e6b8e
2018-07-11 10:12:08 -07:00
Ted Mielczarek dcdf597820 bug 1255485 - build PROGRAMs directly in dist/bin instead of copying them. r=nalexander
Historically we built all our binaries in directories in the objdir, then
symlinked them into dist/bin. Some binaries needed to be copied instead
so that certain relative path lookups work properly, so we resorted to
sprinkling `NSDISTMODE=copy` around Makefiles.

This change makes it so we build PROGRAMs (not any other sort of targets)
directly in dist/bin instead. We could do the same for our other targets
with a little more work.

There were several places in the tree that were copying built binaries to
some other place and needed fixup to match the new location of binaries.

On Windows pdb files are left in the objdir where the program was
originally linked. symbolstore.py needs to locate the pdb file both to
determine whether it should dump symbols for a binary and also to copy
the pdb file into the symbol package. We fix this by simply looking for
the pdb file in the current working directory if it isn't present next
to the binary, which matches how we invoke symbolstore.py.

MozReview-Commit-ID: 8TOD1uTXD5e
2018-01-10 14:26:12 -05:00
Andrew McCreight 5dec0e0beb Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian
This patch was autogenerated by my decomponents.py

It covers almost every file with the extension js, jsm, html, py,
xhtml, or xul.

It removes blank lines after removed lines, when the removed lines are
preceded by either blank lines or the start of a new block. The "start
of a new block" is defined fairly hackily: either the line starts with
//, ends with */, ends with {, <![CDATA[, """ or '''. The first two
cover comments, the third one covers JS, the fourth covers JS embedded
in XUL, and the final two cover JS embedded in Python. This also
applies if the removed line was the first line of the file.

It covers the pattern matching cases like "var {classes: Cc,
interfaces: Ci, utils: Cu, results: Cr} = Components;". It'll remove
the entire thing if they are all either Ci, Cr, Cc or Cu, or it will
remove the appropriate ones and leave the residue behind. If there's
only one behind, then it will turn it into a normal, non-pattern
matching variable definition. (For instance, "const { classes: Cc,
Constructor: CC, interfaces: Ci, utils: Cu } = Components" becomes
"const CC = Components.Constructor".)

MozReview-Commit-ID: DeSHcClQ7cG

--HG--
extra : rebase_source : d9c41878036c1ef7766ef5e91a7005025bc1d72b
2018-02-06 09:36:57 -08:00
Gurzau Raul bbe856eaf5 Backed out 5 changesets (bug 1255485) for mochitest failures on test/mochitest/test_hangui.xul
Backed out changeset 90b7449882b6 (bug 1255485)
Backed out changeset 5672cf8d324b (bug 1255485)
Backed out changeset ed6dd4aefadb (bug 1255485)
Backed out changeset 0ba36c0feddb (bug 1255485)
Backed out changeset 51af06b6123c (bug 1255485)
2018-01-23 02:01:43 +02:00
Ted Mielczarek 2a410dbcc3 bug 1255485 - build PROGRAMs directly in dist/bin instead of copying them. r=nalexander
Historically we built all our binaries in directories in the objdir, then
symlinked them into dist/bin. Some binaries needed to be copied instead
so that certain relative path lookups work properly, so we resorted to
sprinkling `NSDISTMODE=copy` around Makefiles.

This change makes it so we build PROGRAMs (not any other sort of targets)
directly in dist/bin instead. We could do the same for our other targets
with a little more work.

There were several places in the tree that were copying built binaries to
some other place and needed fixup to match the new location of binaries.

On Windows pdb files are left in the objdir where the program was
originally linked. symbolstore.py needs to locate the pdb file both to
determine whether it should dump symbols for a binary and also to copy
the pdb file into the symbol package. We fix this by simply looking for
the pdb file in the current working directory if it isn't present next
to the binary, which matches how we invoke symbolstore.py.

MozReview-Commit-ID: 8TOD1uTXD5e

--HG--
extra : rebase_source : 9140be949b206bb595d9188ce7e8357347ecd9a9
2018-01-10 14:26:12 -05:00
Florian Quèze 0f55cd45be Bug 1421992 - script-generated patch to replace do_execute_soon, do_print and do_register_cleanup with executeSoon, info and registerCleanupFunction, rs=Gijs. 2017-12-21 11:10:23 +01:00
Florian Quèze 032c961e0a Bug 1421992 - script-generated patch to replace do_check_* functions with their Assert.* equivalents, rs=Gijs. 2017-12-21 11:08:17 +01:00
Matt Brubeck 0875e0c11c Bug 1407014 - Fix typo in CyprtoAPI_VerifySignature function name. r=rstrong
MozReview-Commit-ID: 9K61LOVzTrJ

--HG--
extra : rebase_source : f8140a8dc999c1c951d781c0f0edb42df712df3f
2017-10-09 11:57:43 -07:00
Cosm d4680517be Bug 1396795 - mar_read_product_info_block: Value stored to 'location' is never read. r=rstrong 2017-09-05 22:53:16 -07:00
Tom Ritter 24a5f680de Bug 1392626 Fix warning about unused consoleName r=rstrong
MozReview-Commit-ID: IRPnvHfELqs

--HG--
extra : rebase_source : 3618723f3650185592b2db56deec9bd55df9b5a7
2017-08-22 09:09:59 -05:00
Robert Strong 7b64a51b7d Bug 1105689 - use SHA384 certificates to sign app update mar files. Part 3 - libmar test extracted SHA384 signatures from the test mar files. r=mhowell, a=app_update_sha384 2017-07-30 23:27:36 -07:00
Robert Strong 151b7a59bc Bug 1105689 - use SHA384 certificates to sign app update mar files. Part 2 - libmar test mar files signed with a SHA384 cert. r=mhowell, a=app_update_sha384 2017-07-30 23:27:32 -07:00
Robert Strong 93b4c447b3 Bug 1105689 - use SHA384 certificates to sign app update mar files. Part 1 - convert the libmar code from SHA1 to SHA384. r=mhowell, r=spohl, a=app_update_sha384 2017-07-30 23:27:27 -07:00
Robert Strong 6847e81a18 Bug 641212 - use lzma compression for application update. Part 3 - test changes to support the new test mar file size and additional logging. r=mhowell, a=app_update_lzma 2017-07-30 23:27:05 -07:00
Robert Strong c9eed36002 Bug 641212 - use lzma compression for application update. Part 2 - add xe-embedded decompression support to the updater. r=mhowell, , a=app_update_lzma
Changes to the libmar host utilities (mar and signmar) are backwards compatible with the previous versions of mar and signmar
2017-07-30 23:27:00 -07:00
Joel Maher ad033bbef8 Bug 1345618 - add BUG_COMPONENT to modules/* files. r=jfkthame,mcmanus,rstrong
MozReview-Commit-ID: G3hG5C4P5jS
2017-03-09 05:33:31 -05:00
Sylvestre Ledru e016d46a59 Bug 1338086 - Remove useless else blocks in order to reduce complexity modules/libmar/ r=mhowell
MozReview-Commit-ID: GyAIRI7Tsei

--HG--
extra : rebase_source : f88dafa05230d3c5b79a37e930acfc10e4f4627e
2017-02-09 10:54:04 +01:00
Mark Banner 16e6d381ac Bug 503613 - Remove old 'tail =' lines from xpcshell.ini files; r=gps
MozReview-Commit-ID: 62Hp5ISxowJ

--HG--
extra : rebase_source : daa8efb3409031fea553f4fd0c9d0746e38dc308
extra : histedit_source : b4c23aacf678ba0d0ac9c09191a7c494ead11a08
2017-01-18 10:30:39 +00:00
Mike Shal 020f0e804c Bug 1320991 - Support --with-system-{nss,nspr} in modules/libmar; r=glandium
The problem with the modules/libmar/tests/moz.build file when building
--with-system-nspr and --with-system-nss is that the nss libraries don't
exist in the tree, so they fail when trying to copy into the test
directory.

However, it turns out that the libraries copied into the test directory
aren't even used when building with an in-tree copy, because the
xpcshell launcher sets LD_LIBRARY_PATH to point to dist/bin. Since we
use the dist/bin copies anyway for an in-tree build, we can stop copying
them into the test directory and simultaneously fix the --with-system
build.

The DEFINES can also go away since this directory doesn't actually build
anything.

MozReview-Commit-ID: Bk2f28wc9ZJ

--HG--
extra : rebase_source : 63683bbc0c9624121067268cfe6dce0f93b7fbd2
2016-12-20 16:37:18 -05:00
Robert Strong a27aa51a9e Test changes for Bug 1321951 - Use the same mar files on all platforms for libmar tests and general libmar test cleanup. r=mhowell 2016-12-12 16:57:13 -08:00
Robert Strong 87667f8289 Test data files for Bug 1321951 - Use the same mar files on all platforms for libmar tests and general libmar test cleanup. r=mhowell
--HG--
rename : modules/libmar/tests/unit/data/win_0_sized_mar.mar => modules/libmar/tests/unit/data/0_sized.mar
rename : modules/libmar/tests/unit/data/win_1_byte_mar.mar => modules/libmar/tests/unit/data/1_byte.mar
rename : modules/libmar/tests/unit/data/win_binary_data_mar.mar => modules/libmar/tests/unit/data/binary_data.mar
rename : modules/libmar/tests/unit/data/manipulated_signed_mar.mar => modules/libmar/tests/unit/data/manipulated_signed.mar
rename : modules/libmar/tests/unit/data/win_multiple_file_mar.mar => modules/libmar/tests/unit/data/multiple_file.mar
rename : modules/libmar/tests/unit/data/win_multiple_signed_no_pib_mar.mar => modules/libmar/tests/unit/data/multiple_signed_no_pib.mar
rename : modules/libmar/tests/unit/data/win_multiple_signed_pib_mar.mar => modules/libmar/tests/unit/data/multiple_signed_pib.mar
rename : modules/libmar/tests/unit/data/multiple_signed_pib_mar_2.mar => modules/libmar/tests/unit/data/multiple_signed_pib_2.mar
rename : modules/libmar/tests/unit/data/no_pib_mar.mar => modules/libmar/tests/unit/data/no_pib.mar
rename : modules/libmar/tests/unit/data/win_signed_no_pib_mar.mar => modules/libmar/tests/unit/data/signed_no_pib.mar
rename : modules/libmar/tests/unit/data/win_signed_pib_mar.mar => modules/libmar/tests/unit/data/signed_pib.mar
rename : modules/libmar/tests/unit/data/signed_pib_mar_with_mycert2.mar => modules/libmar/tests/unit/data/signed_pib_with_mycert2.mar
2016-12-12 16:56:58 -08:00
Sebastian Hengst 3f0d668bb5 Bug 1310297 - Remove test annotations using b2g, mulet or gonk: modules. r=RyanVM
MozReview-Commit-ID: 2tN5AOxZVvU

--HG--
extra : rebase_source : dc9c12b6669fcd72be5042ac19016d8924dcc2ad
2016-11-05 11:29:21 +01:00
stefanh@inbox.com d1b0bda574 Bug 1287937 - Remove obsolete mac-specific code from modules/libmar/verify/MacVerifyCrypto.cpp and mozglue/misc/StackWalk.cpp. r=spohl. 2016-07-23 00:29:04 +02:00
Tom Tromey 5538d692d3 Bug 1286877 - do not set c-basic-offset for python-mode; r=gps
This removes the unnecessary setting of c-basic-offset from all
python-mode files.

This was automatically generated using

    perl -pi -e 's/; *c-basic-offset: *[0-9]+//'

... on the affected files.

The bulk of these files are moz.build files but there a few others as
well.

MozReview-Commit-ID: 2pPf3DEiZqx

--HG--
extra : rebase_source : 0a7dcac80b924174a2c429b093791148ea6ac204
2016-07-14 10:16:42 -06:00
Mike Hommey 068c777882 Bug 1279105 - Properly shutdown NSS after NSSInitCryptoContext was called. r=rstrong 2016-06-15 12:22:42 +09:00
Chris Peterson 8a9e2d2bd4 Bug 1272513 - Part 2: Remove redundant -Wshadow CXXFLAGS from moz.build files. r=glandium 2016-05-14 00:54:55 -07:00
Mike Shal 70e702783f Bug 1253775 - Remove libmar and libbz2 Makefile.ins; r=ted
MozReview-Commit-ID: aF8PmM0KvF

--HG--
extra : rebase_source : 865188be58878ce6e60ac3af9edd52e1b2bacf5b
2016-03-04 19:03:18 -05:00
ISHIKAWA, Chiaki be2b50a7f8 Bug 1248252 - Improper outdated octal constant syntax in M-C tree. Use '0o' prefix. r=dao
Be warned. Do not attemp to change the .js "test" source code in ./js
They are meant to check

 - the outdated 0666 octal constant is still parsed correctly,
 - the outdated 0666 octal constant raises syntax error flag
   in strict mode, etc.

So leave them alone.
2016-02-15 08:57:00 +01:00
Ted Mielczarek f86b931457 bug 1230117 - get rid of {HOST,TARGET}_NSPR_MDCPUCFG. r=glandium
--HG--
extra : commitid : LJ5QiUWSc4d
extra : rebase_source : 7207b43431e072a5f77397d468d30b5439be2b84
2016-01-21 06:13:06 -05:00
Nicholas Nethercote cc73d37ade Bug 1232219 (part 1) - Fix -Wunused warnings in libmar/. r=bbondy.
--HG--
extra : rebase_source : cdc9f624866a0ba29c31de27a886a9042f16d9e2
2015-12-16 22:24:19 -08:00
Mike Hommey 6627ef45a4 Bug 1235676 - Replace $(abspath $(DEPTH)) with $(topobjdir). r=mshal 2015-12-31 08:10:02 +09:00
Bogdan Postelnicu a87d0177bf Bug 1228332 - Fix a potentially uninitialized pointer read, flagged by static analysis. r=spohl 2015-12-14 07:00:00 +01:00
Hiroyuki Ikezoe bf31e06927 Bug 1167627 - Part 2: Use mozinfo in modules/libmar/. r=rstrong 2015-10-11 21:48:00 +02:00
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
Carsten "Tomcat" Book 08997000eb Backed out 2 changesets (bug 1202902) to recking bug 1202902 to be able to reopen inbound on a CLOSED TREE
Backed out changeset 647025383676 (bug 1202902)
Backed out changeset d70c7fe532c6 (bug 1202902)
2015-10-07 14:03:21 +02:00
Carsten "Tomcat" Book e7ef778c9d Backed out 1 changesets (bug 1202902) for causing merge conflicts to mozilla-central
Backed out changeset cfc1820361f5 (bug 1202902)

--HG--
extra : rebase_source : 5d3db72337754bc7ab0ed0c30b2896100411ff92
2015-10-07 12:13:45 +02:00
Shu-yu Guo d06b6030f6 Bug 1202902 - Scripted fix the world. 2015-10-06 14:00:31 -07:00