Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 48b4c6b74c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| error = GSM_EncodeMultiPartSMS(GSM_GetGlobalDebug(), &smsinfo, &smsout); | ||
| if (!checkError(error, "EncodeMultiPartSMS")) { |
There was a problem hiding this comment.
Preserve the encoder's boolean return contract
With the Gammu 1.44.0 API used by the inspected workflows, GSM_EncodeMultiPartSMS returns gboolean, not GSM_Error, so assigning its result to error cannot propagate a specific encoding failure. A rejected oversized multipart input returns FALSE (0), which checkError converts to the generic GammuError rather than ERR_INVALIDDATA; consequently the newly added pytest.raises(gammu.ERR_INVALIDDATA) case fails, while successful calls only work accidentally because TRUE has the same numeric value as ERR_NONE.
Useful? React with 👍 / 👎.
Prevent Python callers from silently truncating attacker-controlled SMS data at fixed C limits. Propagate core encoding failures and clean up intermediate allocations on error.
Prevent Python callers from silently truncating attacker-controlled SMS data at fixed C limits. Propagate core encoding failures and clean up intermediate allocations on error.