bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#79336: [PATCH] df: fix potential null pointer dereference


From: PƔdraig Brady
Subject: bug#79336: [PATCH] df: fix potential null pointer dereference
Date: Sat, 30 Aug 2025 19:32:10 +0100
User-agent: Mozilla Thunderbird Beta

On 30/08/2025 18:52, PƔdraig Brady wrote:
On 29/08/2025 02:45, yubiao hu wrote:
* src/df.c (get_dev): Fix potential null pointer dereference
- Avoid dereferencing stat_file when both device and
   mount_point are NULL
- Handle allocation failure for cell when mount_point
   is NULL

These are valid concerns.
I also see potential null dereferences of device.
The attached patch takes a different approach
by ensuring arguments are initialized earlier.

I'll hold off on pushing this since until Paul's questions are answered.
I did also think the issue was theoretical,
so my changes should also be seen as just pacifying static analysis,
and making the code a bit more defensive.

cheers,
Padraig





reply via email to

[Prev in Thread] Current Thread [Next in Thread]