1
From 30b1bbc3c3d380aa459b932cf3c0c4b448a91086 Mon Sep 17 00:00:00 2001
2
From: asac <asac@hector.personalfree.com>
3
Date: Wed, 21 Feb 2007 03:34:16 +0100
4
Subject: [PATCH] bz331818-fix-crash-xpidl-zero-arguments
6
+ patch that fixes a crash if xpidl gets not enough arguments
8
xpcom/typelib/xpidl/xpidl.c | 4 ++--
9
1 file changed, 2 insertions(+), 2 deletions(-)
11
Index: mozilla/xpcom/typelib/xpidl/xpidl.c
12
===================================================================
13
--- mozilla.orig/xpcom/typelib/xpidl/xpidl.c 2006-02-03 15:41:11.000000000 +0100
14
+++ mozilla/xpcom/typelib/xpidl/xpidl.c 2007-04-04 18:49:07.000000000 +0200
20
fprintf(stderr, "ERROR: must specify output mode\n");
21
xpidl_usage(argc, argv);
24
- if (argc != i + 1) {
26
fprintf(stderr, "ERROR: extra arguments after input file\n");
30
* Don't try to process multiple files, given that we don't handle -o
33
- if (xpidl_process_idl(argv[i], inc_head, file_basename, mode))
34
+ if ((i < argc) && xpidl_process_idl(argv[i], inc_head, file_basename, mode))