projects
/
SIPServer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2f6dc2f
)
Catch undef parameter (avoid warning/failure on substr)
author
Joe Atzberger
<atz@esilibrary.com>
Tue, 1 Jun 2010 18:50:39 +0000
(18:50 +0000)
committer
Thomas Berezansky
<tsbere@mvlc.org>
Tue, 1 Jun 2010 18:50:39 +0000
(18:50 +0000)
Sip/Checksum.pm
patch
|
blob
|
history
diff --git
a/Sip/Checksum.pm
b/Sip/Checksum.pm
index
da3fbaa
..
7e84ab1
100644
(file)
--- a/
Sip/Checksum.pm
+++ b/
Sip/Checksum.pm
@@
-86,7
+86,7
@@
sub verify_cksum {
my $cksum;
my $shortsum;
- return 0 if (substr($pkt, -6, 2) ne "AZ"); # No checksum at end
+ return 0 if (
not defined($pkt) or
substr($pkt, -6, 2) ne "AZ"); # No checksum at end
# Convert the checksum back to hex and calculate the sum of the
# pack without the checksum.