unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Gerd Möllmann" <gerd.moellmann@gmail.com>
To: Andrew Hyatt <ahyatt@gmail.com>
Cc: 58850@debbugs.gnu.org, Eli Zaretskii <eliz@gnu.org>
Subject: bug#58850: 29.0.50; sqlite crashes on error
Date: Wed, 2 Nov 2022 06:00:08 +0100	[thread overview]
Message-ID: <8cb872ce-23bf-6ea9-94d8-459592bf3550@gmail.com> (raw)
In-Reply-To: <CAM6wYY+kr8QKnG3SV3jjbRge3AYYv2-czZa4Rtj9XYwWP=HB_Q@mail.gmail.com>

On 02.11.22 04:33, Andrew Hyatt wrote:
> It does work for me, thank you for the fix!  I don't think I really 
> understand what is going on here either (does anyone? is the length of 
> the path in the name the relevant thing here?), but if there's a 
> solution that works, then that's enough for me, thanks.  I'll close this 
> bug.

It was a classical stack-buffer overflow.  The "name=..." part of the
printed representation of SQLite objects was printed to a fixed-size
buffer on the processor stack.  With a long enough name, this overwrites
other stuff on the stack, like the return address, and boom.  I fixed
this by not using a buffer al all, which is the way this is done
normally.  There was actually no need for using the buffer in the first
place.

Thanks for the report, and the testing!







      reply	other threads:[~2022-11-02  5:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-29  0:47 bug#58850: 29.0.50; sqlite crashes on error Andrew Hyatt
2022-10-29  7:40 ` Eli Zaretskii
2022-10-29 23:44   ` Andrew Hyatt
2022-10-30  6:35     ` Eli Zaretskii
2022-11-01  4:28       ` Andrew Hyatt
2022-11-01  7:45         ` Eli Zaretskii
2022-11-01  9:03           ` Gerd Möllmann
2022-11-01  9:16             ` Gerd Möllmann
2022-11-02  3:33               ` Andrew Hyatt
2022-11-02  5:00                 ` Gerd Möllmann [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8cb872ce-23bf-6ea9-94d8-459592bf3550@gmail.com \
    --to=gerd.moellmann@gmail.com \
    --cc=58850@debbugs.gnu.org \
    --cc=ahyatt@gmail.com \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).