aboutsummaryrefslogtreecommitdiffstats
path: root/gitweb.cgi
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@suse.de>2006-01-17 03:50:20 +0100
committerKay Sievers <kay.sievers@suse.de>2006-01-17 03:50:20 +0100
commit2c5c008b462fd5d2e32318077aaa3bc4e67c84fd (patch)
treec18277c5278f84a0ad3b94cef68cec2f4a28630e /gitweb.cgi
parentv263 (diff)
downloadgit-2c5c008b462fd5d2e32318077aaa3bc4e67c84fd.tar.gz
git-2c5c008b462fd5d2e32318077aaa3bc4e67c84fd.zip
fix: Use of uninitialized value
The subroutine did not check the case where HEAD does not verify. Patch from Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'gitweb.cgi')
-rwxr-xr-xgitweb.cgi9
1 files changed, 5 insertions, 4 deletions
diff --git a/gitweb.cgi b/gitweb.cgi
index 986d7dacd6..cb033733b9 100755
--- a/gitweb.cgi
+++ b/gitweb.cgi
@@ -404,12 +404,13 @@ sub git_read_head {
if (open my $fd, "-|", "$gitbin/git-rev-parse", "--verify", "HEAD") {
my $head = <$fd>;
close $fd;
- chomp $head;
- if ($head =~ m/^[0-9a-fA-F]{40}$/) {
- $retval = $head;
+ if (defined $head && $head =~ /^([0-9a-fA-F]{40})$/) {
+ $retval = $1;
}
}
- $ENV{'GIT_DIR'} = $oENV;
+ if (defined $oENV) {
+ $ENV{'GIT_DIR'} = $oENV;
+ }
return $retval;
}
d>mac80211: Clear PS related flag on disabling power save.Vivek Natarajan1-0/+1 2011-02-18ath9k_hw: Updates for AR9485 1.1 chipsets.Vivek Natarajan3-11/+1246 2011-02-18ath9k_htc: Fix a compilation warning.Vivek Natarajan1-1/+1 2011-02-18small adjustment to net/mac80211/KconfigJan Beulich1-1/+1 2011-02-18ssb: reset device only if it was enabledRafał Miłecki1-18/+22 2011-02-18ssb: when needed, reject IM input while disabling deviceRafał Miłecki2-1/+17 2011-02-18p54: implement flush callbackChristian Lamparter1-0/+43 2011-02-18ssb: remove invalid define SSB_TMSLOW_PHYCLKRafał Miłecki1-1/+0 2011-02-18ssb: trivial: fix SPROM extract warning formattingRafał Miłecki1-1/+1 2011-02-18mac80211: fix 2.4 GHz 40 MHz disablingJohannes Berg4-15/+13 2011-02-18wireless-next-2.6: brcm80211: fix compile issueHenry Ptasinski1-1/+3 2011-02-18mac80211: Add power to debugfs.Ben Greear1-0/+6 2011-02-18p54: Fix compile warningLarry Finger1-1/+1 2011-02-18ath5k: move external function definitions to a header fileBob Copeland2-17/+20 2011-02-18ssb: Make ssb_wait_bit multi-bit safeMichael Büsch1-6/+6 2011-02-18ath5k: Correct channel setting for AR2317 chipNikolay Ledovskikh1-0/+1 2011-02-18wireless: rt2x00: rt2800pci.c: add two idsXose Vazquez Perez1-0/+2 2011-02-18mac80211: fix conn_mon_timer running after disassociateStanislaw Gruszka1-0/+6 2011-02-17Bluetooth: fix checkpatch errors in af_bluetooth.cGustavo F. Padovan1-1/+1 2011-02-17Bluetooth: Fix errors reported by checkpatch.plGustavo F. Padovan1-3/+3 2011-02-17Bluetooth: fix errors reported by checkpatch.plGustavo F. Padovan2-22/+18 2011-02-17Bluetooth: Fix some code style issues in hci_event.cSzymon Janc1-8/+10 2011-02-17Bluetooth: Fix some code style issues in hci_core.cSzymon Janc1-4/+3 2011-02-17Bluetooth: Fix some code style issues in hci_core.hSzymon Janc1-29/+29 2011-02-17Bluetooth: Clean up hci_sniff_subrate_evt functionSzymon Janc1-9/+0 2011-02-17Bluetooth: Use #include <linux/uaccess.h> instead of <asm/uaccess.h>Szymon Janc1-1/+1 2011-02-16Bluetooth: Send LE Connection Update CommandClaudio Takahasi4-1/+40 2011-02-16Bluetooth: Use proper timer for hci command timoutVille Tervo4-7/+26 2011-02-16Bluetooth: Make hci a child of the corresponding tty device.Andrei Warkentin1-0/+1 2011-02-16Bluetooth: Fix crash when ioctl(HCIUARTSETPROTO) failsGustavo F. Padovan1-0/+2 2011-02-16Bluetooth: Add connection parameter update responseClaudio Takahasi2-1/+73 2011-02-16Bluetooth: Add LE signaling commands handlingClaudio Takahasi2-52/+92 2011-02-16Bluetooth: Use usb_fill_int_urb()Gustavo F. Padovan1-7/+3