git.shiar.nl
/
sheet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9e77d52
)
word: prevent infinite loops on invalid data
author
Mischa POSLAWSKY
<perl@shiar.org>
Mon, 1 Nov 2021 23:38:57 +0000
(
00:38
+0100)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Mon, 6 Dec 2021 11:07:29 +0000
(12:07 +0100)
word.plp
patch
|
blob
|
history
diff --git
a/word.plp
b/word.plp
index d1c0241bbf93425892807bf238b1e3c14277813e..64a093fed42afa818d8185450b8815e80e82cedd 100644
(file)
--- a/
word.plp
+++ b/
word.plp
@@
-89,6
+89,7
@@
sub printimgs {
say '<ul>';
for my $row (@_) {
my ($id, $level, $title) = split /:/, $row, 3;
+ $id or die "empty reference"; # assertion to prevent loops
my @type;
push @type, 'parent' if defined $table->{$id};
push @type, 'large' if $level =~ s/c$//;