aboutsummaryrefslogtreecommitdiff
path: root/gitweb
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-07-31 19:24:37 -0700
committerJunio C Hamano <junkio@cox.net>2006-07-31 19:24:37 -0700
commit46b059d718777ab146b8089afd3d2fcdd6000154 (patch)
tree1226bfd569f8da3e5e21d017e6117fd501d4113e /gitweb
parentb77aeb249a0ebdb8daa85ba58bbecde537f84025 (diff)
downloadgit-46b059d718777ab146b8089afd3d2fcdd6000154.tar.gz
git-46b059d718777ab146b8089afd3d2fcdd6000154.tar.xz
gitweb: fix use of uninitialized value.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'gitweb')
-rwxr-xr-xgitweb/gitweb.cgi8
1 files changed, 5 insertions, 3 deletions
diff --git a/gitweb/gitweb.cgi b/gitweb/gitweb.cgi
index 902b96a91..f65b5d5ce 100755
--- a/gitweb/gitweb.cgi
+++ b/gitweb/gitweb.cgi
@@ -779,9 +779,11 @@ sub mimetype_guess_file {
open(MIME, $mimemap) or return undef;
while (<MIME>) {
my ($mime, $exts) = split(/\t+/);
- my @exts = split(/\s+/, $exts);
- foreach my $ext (@exts) {
- $mimemap{$ext} = $mime;
+ if (defined $exts) {
+ my @exts = split(/\s+/, $exts);
+ foreach my $ext (@exts) {
+ $mimemap{$ext} = $mime;
+ }
}
}
close(MIME);