[PATCH] Fix off-by-one error in compute_delayed_physnames

Tom Tromey tom@tromey.com
Mon Dec 4 18:46:05 GMT 2023


>>>>> "Tom" == Tom Tromey <tom@tromey.com> writes:

Tom> compute_delayed_physnames does this:
Tom> 	  size_t len = strlen (physname);
Tom> ...
Tom> 	      if (physname[len] == ')') /* shortcut */
Tom> 		break;

Tom> However, physname[len] will always be \0.

Tom> This patch changes it to the correct len-1.

This is fairly trivial; I'm going to check it in now.

Tom


More information about the Gdb-patches mailing list