Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Nicolas George <george@nsup.org>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH 00/22] Deprecate av_uninit
Date: Fri, 11 Apr 2025 10:36:17 +0200
Message-ID: <Z_jUgQrjVSXkDfvN@phare.normalesup.org> (raw)
In-Reply-To: <tencent_079C0CE00E5AB635FB818234013E7F56A909@qq.com>

Zhao Zhili (HE12025-04-11):
> From: Zhao Zhili <zhilizhao@tencent.com>
> 
> The macro is meant to suppress false uninitialized warnings. However,
> sometimes these 'false uninitialized warnings' are really undefined
> behavior, and leading to real issue like crash, e.g., ab792634197e.
> 
> For false uninitialized warnings, it can be silenced by initialization,
> and compiler can easily optimize away unnecessary initializations.
> 
> av_uninit shouldn't be used in any case.

NAK, you are hiding the UBs, not fixing the bugs.

If the author of the code put av_uninit, that means they believe the
value will always have been initialized by the part of the code
responsible for it. If that is not true, then it is a bug that can lead
to an exploitable security issue or a silent data corruption.

With your changes, nothing proves that the = 0 you put there is the
right value, the bug is still there: the code expects the value to be
correctly set, but instead there is an arbitrary 0.

At least, with av_uninit, valgrind and fuzzing can find the bugs.

Regards,

-- 
  Nicolas George
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

  reply	other threads:[~2025-04-11  8:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-11  7:55 Zhao Zhili
2025-04-11  8:36 ` Nicolas George [this message]
2025-04-11  9:00   ` Zhao Zhili
2025-04-11  9:32     ` Nicolas George
2025-04-11  9:36       ` Zhao Zhili
2025-04-11  9:52         ` Nicolas George
2025-04-11  9:19   ` Zhao Zhili
2025-04-11 11:01     ` Andreas Rheinhardt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Z_jUgQrjVSXkDfvN@phare.normalesup.org \
    --to=george@nsup.org \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git