-
Notifications
You must be signed in to change notification settings - Fork 68
Open
Description
There is a file: https://github.com/valyala/gozstd/blob/master/writer.go#L163
line 163
inBuf := (*C.ZSTD_inBuffer)(C.calloc(1, C.sizeof_ZSTD_inBuffer))
if function calloc can't allocate memory and return nil - then there is a problem on next line.
inBuf.src = C.calloc(1, cstreamInBufSize)
I mean: if inBuf == nil, then inBuf.src will cause panic
Should I make a check here? What should be done in this case?
Metadata
Metadata
Assignees
Labels
No labels