File tree Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Original file line number Diff line number Diff line change @@ -169,6 +169,7 @@ JNIEXPORT jlong JNICALL Java_com_github_luben_zstd_Zstd_decompressedDirectByteBu
169
169
char * src_buf_ptr = (char * )(* env )-> GetDirectBufferAddress (env , src_buf );
170
170
if (src_buf_ptr == NULL ) goto E1 ;
171
171
size = JNI_ZSTD_decompressedSize (src_buf_ptr + src_offset , (size_t ) src_size , magicless );
172
+ if (size <= 0 ) return 0 ;
172
173
E1 : return size ;
173
174
}
174
175
@@ -185,7 +186,6 @@ JNIEXPORT jlong JNICALL Java_com_github_luben_zstd_Zstd_getDirectByteBufferFrame
185
186
char * src_buf_ptr = (char * )(* env )-> GetDirectBufferAddress (env , src_buf );
186
187
if (src_buf_ptr == NULL ) goto E1 ;
187
188
size = JNI_ZSTD_decompressedSize (src_buf_ptr + src_offset , (size_t ) src_size , magicless );
188
- if (size <= 0 ) return 0 ;
189
189
E1 : return size ;
190
190
}
191
191
You can’t perform that action at this time.
0 commit comments