Bug 890853. r=rstrong.
authorBrian R. Bondy <netzen@gmail.com>
Mon, 22 Jul 2013 22:35:20 -0400
changeset 151822 896cdd92608d8818fe2ce37313917febd8755d4b
parent 151821 bdceed7037666e3133b84c5fa7856fb6710814a1
child 151823 f750e5a76656dc58f430e6f51e5373c99ede276e
push id2859
push userakeybl@mozilla.com
push dateMon, 16 Sep 2013 19:14:59 +0000
treeherdermozilla-beta@87d3c51cd2bf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrstrong
bugs890853
milestone25.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 890853. r=rstrong.
modules/libmar/src/mar_read.c
--- a/modules/libmar/src/mar_read.c
+++ b/modules/libmar/src/mar_read.c
@@ -173,17 +173,17 @@ MarFile *mar_open(const char *path) {
 
   return mar_fpopen(fp);
 }
 
 #ifdef XP_WIN
 MarFile *mar_wopen(const wchar_t *path) {
   FILE *fp;
 
-  fp = _wfopen(path, L"rb");
+  _wfopen_s(&fp, path, L"rb");
   if (!fp)
     return NULL;
 
   return mar_fpopen(fp);
 }
 #endif
 
 void mar_close(MarFile *mar) {
@@ -381,17 +381,17 @@ read_product_info_block(char *path,
  *
  * @param infoBlock Out parameter for where to store the result to
  * @return 0 on success, -1 on failure
 */
 int
 mar_read_product_info_block(MarFile *mar, 
                             struct ProductInformationBlock *infoBlock)
 {
-  int i, hasAdditionalBlocks, offset, 
+  int i, hasAdditionalBlocks,
     offsetAdditionalBlocks, numAdditionalBlocks,
     additionalBlockSize, additionalBlockID;
   /* The buffer size is 97 bytes because the MAR channel name < 64 bytes, and 
      product version < 32 bytes + 3 NULL terminator bytes. */
   char buf[97] = { '\0' };
   int ret = get_mar_file_info_fp(mar->fp, NULL, NULL,
                                  &hasAdditionalBlocks, 
                                  &offsetAdditionalBlocks,