gecko-dev/b2g
Mike Hommey 4725fcb648 Bug 1271574 - Purposefully leak the XUL_APP_FILE string passed to putenv. r=bsmedberg
Before bug 552864, the string was created with PR_smprintf, and
PR_SetEnv'ed (which, under the hood, just calls putenv). PR_smprintf was
allocating the string on the heap. Now, it's allocated on the stack, and
still putenv'ed.

putenv kind of takes ownership of the strings it's being passed, so
stack allocated strings are dangerous to use. It looks like we've been
fairly lucky that it worked, presumably because compilers would keep the
stack frame with the variable, but that's not guaranteed to happen, and
in some case, doesn't.

So we strdup the string and purposefully leak it instead, which matches
what happened before bug 552864, and is the only "sane" way to use
putenv.

--HG--
extra : rebase_source : e39349f90f5346b591e20696c0c3c7fdb26c3cfb
2016-06-02 08:44:16 +09:00
..
app Bug 1271574 - Purposefully leak the XUL_APP_FILE string passed to putenv. r=bsmedberg 2016-06-02 08:44:16 +09:00
branding Bug 1256988 - Replace tests on MOZ_WIDGET_GTK with tests on MOZ_WIDGET_TOOLKIT containing gtk. r=chmanchester 2016-03-17 06:49:44 +09:00
chrome Bug 1111440 - Replace -moz- prefixed logical margin/padding/border properties with their standard versions. r=heycam 2016-05-12 22:19:58 -07:00
components Bug 1277197 - fix JS error in PresentationRequestUIGlue for 2-UAs device. r=kuoe0. 2016-06-01 21:12:21 +08:00
config Bug 1272483 - Remove MOZ_UPDATE_PACKAGING and --enable-update-packaging; r=chmanchester 2016-05-12 12:15:58 -04:00
dev Bug 1259850 - Update sixgill to ignore exception cleanup and properly qualify some type names 2016-05-04 18:36:23 -07:00
gaia Bug 1256401 - Part 2: Remove references to b2gdroid. r=fabrice 2016-03-18 14:41:51 -07:00
graphene Bug 1272483 - Remove MOZ_UPDATE_PACKAGING and --enable-update-packaging; r=chmanchester 2016-05-12 12:15:58 -04:00
installer Bug 1228266 - rename TCPPresentationServer to PresentationControlService. r=junior. 2016-05-20 14:53:30 +08:00
locales Bug 1274729 - corrupted content string management r=dragana 2016-05-23 10:12:31 -04:00
simulator Bug 1198877 - Enable software buttons on simulators r=jryans 2015-11-19 09:51:22 -08:00
test
LICENSE
Makefile.in
app.mozbuild Bug 1217687 - Revert back to including /devtools via toolkit. r=glandium 2015-10-23 06:04:45 -05:00
build.mk
common.configure Bug 1257516 - Rename error() to die() and make it take arguments like the logging module. r=ted 2016-03-30 06:59:44 +09:00
confvars.sh Bug 1257326 - Remove MOZ_SERVICES_COMMON. It is usually set, but never checked. r=glandium 2016-05-12 11:55:59 -07:00
moz.build Bug 1221724 followup - remove B2G and android references to redit, r=bustage on a CLOSED TREE 2016-02-11 11:44:33 -05:00
moz.configure Bug 1262020 - Move --with-android-ndk, --with-android-toolchain and --with-android-gnu-compiler-version to moz.configure. r=nalexander 2016-04-06 07:25:13 +09:00