Closed micl2e2 closed 11 months ago
The proposed patch is just wrong. The text can be null and there is no way a nullptr dereference can happen in the code.
Okay. If all callers effectively ensure that the text
is non-null, then this patch is probably redundant. But even that, it is based on m
being non-null, do all callers effectively ensure it too? If so, my consideration would be less than useful.
text
is a local variable, so it is irrelevant, what is passed by the callers. Not all messages have text, therefore text
for sure can be null
, but it is definitely non-null for messages of the type MessageContentType::Text
.
Also, there is no way or need to send null
messages, so m
is never null
, which can be easely checked by the source code.
quite make sense, then this is an unnecessary patch.
How you would know?
Sent from Yahoo Mail on Android
On Sun, Nov 19, 2023 at 6:12 PM, Michael @.***> wrote:
Okay. If all callers effectively ensure that the text is non-null, then this patch is probably redundant. But even that, it is based on m being nonnull, does all callers effectively ensured it too? If so, my consideration would be less than useful.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>
There is no checks before constructing the tl_object
secret_api::decryptedMessage
, in which a pointer dereference happens. This patch fixes the potential nullptr dereference.