Skip to content

Commit 24233a8

Browse files
committed
Replace ftello() with BIO_tell() in get_current_position()
1 parent ce42171 commit 24233a8

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

appx.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2790,11 +2790,12 @@ static int readZip64EOCDR(ZIP64_EOCDR *eocdr, FILE *file, uint64_t offset)
27902790

27912791
static int get_current_position(BIO *bio, uint64_t *offset)
27922792
{
2793-
FILE *file = NULL;
27942793
int64_t pos;
27952794

2796-
BIO_get_fp(bio, &file);
2797-
pos = ftello(file);
2795+
if (!bio) {
2796+
return 0; /* FAILED */
2797+
}
2798+
pos = BIO_tell(bio);
27982799
if (pos < 0) {
27992800
return 0; /* FAILED */
28002801
}

0 commit comments

Comments
 (0)