[vlc-commits] [Git][videolan/vlc][master] 3 commits: smb2: rename logged seek function name
Felix Paul Kühne (@fkuehne)
gitlab at videolan.org
Fri Apr 22 15:57:25 UTC 2022
Felix Paul Kühne pushed to branch master at VideoLAN / VLC
Commits:
d70173fc by Thomas Guillem at 2022-04-22T15:39:06+00:00
smb2: rename logged seek function name
- - - - -
9646722d by Thomas Guillem at 2022-04-22T15:39:06+00:00
smb2: fix lseek return type
It was causing seek error when seeking past INT_MAX
Regression from c23709134c77dc70d66cc3420ceadfe08b28ed44
- - - - -
e6b0c071 by Thomas Guillem at 2022-04-22T15:39:06+00:00
smb2: don't seek past INT64_MAX
- - - - -
1 changed file:
- modules/access/smb2.c
Changes:
=====================================
modules/access/smb2.c
=====================================
@@ -313,12 +313,19 @@ FileSeek(stream_t *access, uint64_t i_pos)
if (sys->smb2 == NULL)
return VLC_EGENERIC;
+ if (i_pos > INT64_MAX)
+ {
+ msg_Err(access, "can't seek past INT64_MAX (requested: %"PRIu64")\n",
+ i_pos);
+ return VLC_EGENERIC;
+ }
+
struct vlc_smb2_op op = VLC_SMB2_OP(access, &sys->smb2);
- int err = smb2_lseek(op.smb2, sys->smb2fh, i_pos, SEEK_SET, NULL);
+ int64_t err = smb2_lseek(op.smb2, sys->smb2fh, i_pos, SEEK_SET, NULL);
if (err < 0)
{
- VLC_SMB2_SET_ERROR(&op, "smb2_seek_async", err);
+ VLC_SMB2_SET_ERROR(&op, "smb2_lseek", err);
return err;
}
sys->eof = false;
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/54a136d93b5cfedced841dd21a0a16133ed04158...e6b0c071b6483bc521b12600482bd233f87b57b9
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/54a136d93b5cfedced841dd21a0a16133ed04158...e6b0c071b6483bc521b12600482bd233f87b57b9
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list