Bug 890853. r=rstrong, a=bajaj
authorBrian R. Bondy <netzen@gmail.com>
Mon, 22 Jul 2013 22:35:20 -0400
changeset 148138 5d99a7c9a26ad78e6dbdf47e4d615771b0e9e789
parent 148137 c190484e9e43dfafcbd87987bc137c6ca987f80a
child 148139 c93b75b0efdbc2316199483f5563d0aad5487c86
push id2697
push userbbajaj@mozilla.com
push dateMon, 05 Aug 2013 18:49:53 +0000
treeherdermozilla-beta@dfec938c7b63 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrstrong, bajaj
bugs890853
milestone24.0a2
Bug 890853. r=rstrong, a=bajaj
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,