aboutsummaryrefslogtreecommitdiff
path: root/openssl-sys/src
diff options
context:
space:
mode:
authorSebastian Thiel <[email protected]>2017-03-06 10:14:39 +0100
committerSebastian Thiel <[email protected]>2017-03-06 10:14:39 +0100
commitec2685347c8eba32234a14c4fdc81d6ce83dc97d (patch)
tree2dedf0ba10ec21c5bbf2a4f23a68d89152036cdc /openssl-sys/src
parentAdd test to run into issue with stack.len() (diff)
downloadrust-openssl-ec2685347c8eba32234a14c4fdc81d6ce83dc97d.tar.xz
rust-openssl-ec2685347c8eba32234a14c4fdc81d6ce83dc97d.zip
Fix for empty stacks
The culprit is that `sk_num(stack)` can return -1 as c_int if there is no stack allocated. Previously, thanks to unsafe casts, this would result in a isize::max() for len() and iteration size if there was no stack. Now this case is handled specifically, which fixes the issue.
Diffstat (limited to 'openssl-sys/src')
0 files changed, 0 insertions, 0 deletions