History

avformat/subfile: Assert that whence is a known case

This may help CID1452449 Uninitialized scalar variable

Michael Niedermayer committed 2 years ago

Commit 426d8c81 parent 2a0a7d91 file · +3 −0Browse files

Unified · Split

libavformat/subfile.c+3−0
@@ -18,6 +18,7 @@ · 17 unmodified lines
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */19 */
20 20
21#include "libavutil/avassert.h"
21#include "libavutil/avstring.h"22#include "libavutil/avstring.h"
22#include "libavutil/opt.h"23#include "libavutil/opt.h"
23#include "url.h"24#include "url.h"
@@ -135,6 +136,8 @@ static int64_t subfile_seek(URLContext *h, int64_t pos, int whence) · 111 unmodified lines
135 case SEEK_END:136 case SEEK_END:
136 new_pos = end + pos;137 new_pos = end + pos;
137 break;138 break;
139 default:
140 av_assert0(0);
138 }141 }
139 if (new_pos < c->start)142 if (new_pos < c->start)
140 return AVERROR(EINVAL);143 return AVERROR(EINVAL);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t