mirror of
https://github.com/urbit/shrub.git
synced 2024-12-12 10:29:01 +03:00
Revert "Revert "fix rub to crash gracefully upon decoding invalid data""
This reverts commit 8c87faf180e00c582b01f7c4e82b77b17933596a. The previous use-after-free fix appears to alleviate the crash "caused" by this code.
This commit is contained in:
parent
1c0ea84ccd
commit
d59003e4e2
@ -1743,7 +1743,12 @@
|
|||||||
~/ %rub
|
~/ %rub
|
||||||
|= [a=@ b=@]
|
|= [a=@ b=@]
|
||||||
^- [p=@ q=@]
|
^- [p=@ q=@]
|
||||||
=+ c==+(c=0 |-(?.(=(0 (cut 0 [(add a c) 1] b)) c $(c +(c)))))
|
=+ ^= c
|
||||||
|
=+ [c=0 m=(met 0 b)]
|
||||||
|
|- ?< (gth c m)
|
||||||
|
?. =(0 (cut 0 [(add a c) 1] b))
|
||||||
|
c
|
||||||
|
$(c +(c))
|
||||||
?: =(0 c)
|
?: =(0 c)
|
||||||
[1 0]
|
[1 0]
|
||||||
=+ d=(add a +(c))
|
=+ d=(add a +(c))
|
||||||
|
Loading…
Reference in New Issue
Block a user