Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 345945
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T11:07:53+00:00 2026-05-12T11:07:53+00:00

I am trying to debug a segfault, and I have this output from gdb:

  • 0

I am trying to debug a segfault, and I have this output from gdb:

(gdb) n

Program received signal SIGSEGV, Segmentation fault.
0x08048af9 in parse_option_list (ptr=0x6f72505f <Address 0x6f72505f out of bounds>, box_name=0x696d6978 <Address 0x696d6978 out of bounds>, option_list=0x313a7974, 
    num_elements=0x33313532) at submit.c:125
125                         memcpy(&(option_list[(*num_elements)].value), value, 24);
(gdb) p num_elements
$15 = (int *) 0x33313532
(gdb) p *num_elements
Cannot access memory at address 0x33313532
(gdb) 

It looks to me like something in memcpy() is going haywire. But I can’t figure out what exactly the problem is, since that line references so many variables.

Can somebody help figure out what the 0x8048af9 in parse_option_list... line is telling me?

My function signature is:

int parse_option_list(char *ptr, char *box_name,
   struct option_list_values *option_list, int *num_elements)

And this might be useful:

struct option_list_values {
    char value[24];
    char name[24];
};

Also, the variables value and name are not segfaulting (but if you think they are, i can post the code which sets those values.) But right now, if I can understand this gdb output, I will be happy as a clam! Thank you!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T11:07:53+00:00Added an answer on May 12, 2026 at 11:07 am

    You have all the signs of a classic buffer overflow. The values of all the stack parameters have been overwritten by ASCII text – here is the translation of those values (assuming you have a little-endian architecture, which looks right):

    ptr = 0x6f72505f = "_Pro"
    box_name = 0x696d6978 = "ximi"
    option_list = 0x313a7974 = "ty:1"
    num_elements = 0x33313532 = "2513"
    

    Concatenating them together gives "_Proximity:12513" – if this substring looks familiar to you, you should be able to track down where that data is being copied around – somewhere you are copying it into an array stored on the stack, without proper bounds checking.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to debug a problem where our program crashes (segfault) in the
I've been trying to debug a memory leak in my program, and have narrowed
I'm trying to use GDB to debug (to find an annoying segfault). When I
I'm trying to debug a program I inherited. This program contains Strings, array lists
When trying to debug a program on Windows I can't seem to find where
I'm trying to debug an old VB6 program at my job. It's full of
I'm trying to debug this problem but not sure where exactly i need to
I'm trying to debug a Windows program compiled using MinGW's gcc that only ever
I trying to debug code on my first Android program. I started using the
I am trying to debug within VS2010 a message which gets dispatched from my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.