public
/
ack.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
81947fb
)
Fixed bug reported on tack-devel mailing list on 20-3-2011
author
cjhjacobs
<none@none>
Wed, 18 May 2011 17:19:19 +0000
(19:19 +0200)
committer
Nick Downing
<nick@ndcode.org>
Wed, 17 Apr 2019 14:15:20 +0000
(
00:15
+1000)
util/ass/ass80.c
patch
|
blob
|
history
diff --git
a/util/ass/ass80.c
b/util/ass/ass80.c
index
66e5a31
..
614dbaf
100644
(file)
--- a/
util/ass/ass80.c
+++ b/
util/ass/ass80.c
@@
-189,7
+189,13
@@
cons_t xgetarb(l,f) int l; FILE *f ; {
shift=0 ; val=0 ;
while ( l-- ) {
- val += ((cons_t)(c = ctrunc(xgetc(f))))<<shift ;
+ // val += ((cons_t)(c = ctrunc(xgetc(f))))<<shift ;
+ // Bug here: shifts with too large shift counts
+ // get unspecified results. --Ceriel
+ c = ctrunc(xgetc(f));
+ if (shift < 8 * sizeof(cons_t)) {
+ val += ((cons_t)c)<<shift ;
+ }
shift += 8 ;
}
if (c == 0377 && shift > 8 && ((shift>>3)&1)) {