From 80a1c43a2c0f961a4f6dedce0e1fc98d0ca91029 Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Wed, 5 Sep 2012 16:52:54 -0700 Subject: [PATCH] Bug 788884 - Fix compiler warning and potential integer underflow [r=bsmedberg] --- b2g/app/nsBrowserApp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/app/nsBrowserApp.cpp b/b2g/app/nsBrowserApp.cpp index 1758e379b046..a0bb7bf1c0fa 100644 --- a/b2g/app/nsBrowserApp.cpp +++ b/b2g/app/nsBrowserApp.cpp @@ -164,7 +164,7 @@ int main(int argc, char* argv[]) } char *lastSlash = strrchr(exePath, XPCOM_FILE_PATH_SEPARATOR[0]); - if (!lastSlash || (lastSlash - exePath > MAXPATHLEN - sizeof(XPCOM_DLL) - 1)) + if (!lastSlash || ((lastSlash - exePath) + sizeof(XPCOM_DLL) + 1 > MAXPATHLEN)) return 255; strcpy(++lastSlash, XPCOM_DLL);