diff options
| author | Sebastian Thiel <[email protected]> | 2017-03-06 10:14:39 +0100 |
|---|---|---|
| committer | Sebastian Thiel <[email protected]> | 2017-03-06 10:14:39 +0100 |
| commit | ec2685347c8eba32234a14c4fdc81d6ce83dc97d (patch) | |
| tree | 2dedf0ba10ec21c5bbf2a4f23a68d89152036cdc /openssl-sys | |
| parent | Add test to run into issue with stack.len() (diff) | |
| download | rust-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')
0 files changed, 0 insertions, 0 deletions