Skip to content

Commit

Permalink
Don't try to deref a pointer with cffi when doing a null check
Browse files Browse the repository at this point in the history
This causes issues with pointers to opaque structs
  • Loading branch information
wbond committed Oct 1, 2022
1 parent 8dab946 commit 4197348
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions oscrypto/_ffi.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,6 @@ def is_null(point):
return True
if ffi.getctype(ffi.typeof(point)) == 'void *':
return False
if point[0] == ffi.NULL:
return True
return False

def errno():
Expand Down

0 comments on commit 4197348

Please sign in to comment.