diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2024-03-09 13:40:19 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2024-03-12 14:35:52 +0100 |
commit | 9b9b57419197a87ed0a627af4dc5116afe82714a (patch) | |
tree | 2ed5ed5a35322df2bf8d505195636915eba5669c /libavformat/rtpdec_mpegts.c | |
parent | 4027c2e1d03915f0dd9c58f4f9474f60710fdb39 (diff) | |
download | ffmpeg-9b9b57419197a87ed0a627af4dc5116afe82714a.tar.gz |
avcodec/tiff: Fix handling of av_strdup() failures
For unknown geokey values, get_geokey_val() returns
"Unknown-%d" with val being used for %d. This string
is allocated and therefore all the known geokey values
(static strings) are strdup'ed. In case this fails
it is either ignored or treated as "Unknown-%d".
(Furthermore it is possible to call av_strdup(NULL),
although this is not documented to be legal.)
This commit changes this by only returning the static strings
in get_geokey_val(); the unknown handling and strdup'ing
is moved out of it.
Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavformat/rtpdec_mpegts.c')
0 files changed, 0 insertions, 0 deletions