| From: | Michael Paquier <michael(at)paquier(dot)xyz> |
|---|---|
| To: | Tristan Partin <tristan(at)partin(dot)io> |
| Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, malis(at)pgrust(dot)com |
| Subject: | Re: Fix a host of strto*() bugs |
| Date: | 2026-08-02 10:26:30 |
| Message-ID: | am8bVmmLZ11KnIgr@paquier.xyz |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Fri, Jul 31, 2026 at 05:03:38PM +0900, Michael Paquier wrote:
> @@ -961,7 +961,7 @@ precheck_tar_backup_file(verifier_context *context, char *relpath,
> * Report an error if we didn't consume at least one character, if the
> * result is 0, or if the value is too large to be a valid OID.
> */
> - if (suffix == NULL || num <= 0 || num > OID_MAX)
> + if (suffix == relpath || num <= 0 || num > OID_MAX)
>
> Because that's something part of the C standard. My Linux man page
> has a reference to that, as well:
> "If there were no digits at all, strtoul() stores the original value
> of nptr in *endptr (and returns 0)."
0002 and 0005 have been merged together, and applied as 355814931141.
--
Michael
| From | Date | Subject | |
|---|---|---|---|
| Previous Message | Hüseyin Demir | 2026-08-02 10:15:29 | Re: Checkpoint replication slots later |