Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.os2.programmer.misc > #283

Re: Passing string pointers in a custom control-data structure == FAIL

From "Alex Taylor" <mail.me@reply.to.address>
Newsgroups comp.os.os2.programmer.misc
Subject Re: Passing string pointers in a custom control-data structure == FAIL
Date 2011-06-18 06:03 -0500
Organization Newscene Usenet News Service, http://www.newscene.com/
Message-ID <mdq090pMZSKk-pn2-xK8jDQVWceIF@localhost> (permalink)
References <mdq090pMZSKk-pn2-EHH7HPrgtTe2@localhost> <o8uYFJ3iqTdG-pn2-2w59MQ4dhHl3@localhost>

Show all headers | View raw


On Sat, 18 Jun 2011 10:14:36 UTC, "A.D. Fundum" <what.ever@neverm.ind> wrote:

>  > pPrivate->ctldata.pszFS   = strdup( pPublic->pszFS );
>  > pPrivate->ctldata.pszSize = strdup( pPublic->pszSize );
> 
>  > * At this point, infodata.pszFS and infodata.pszSize are
>  > * reported by IBM debugger as "invalid string".
> 
> FTR: you aren't checking what strdup() returns.

In fact, it never gets to this point as the incoming pPublic->pszFS 
and pPublic->pszSize are invalid (and hence strdup crashes the program).

I have checked the output of strdup in the main application function 
(using IPMD) and they are fine.  They're just never reaching the
controls window proc.

-- 
Alex Taylor
Fukushima, Japan
http://www.socis.ca/~ataylo00

Please take off hat when replying.

Back to comp.os.os2.programmer.misc | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Passing string pointers in a custom control-data structure == FAIL "Alex Taylor" <mail.me@reply.to.address> - 2011-06-17 23:08 -0500
  Re: Passing string pointers in a custom control-data structure == FAIL Marcel Müller <news.5.maazl@spamgourmet.com> - 2011-06-18 09:23 +0200
    Re: Passing string pointers in a custom control-data structure == FAIL "Alex Taylor" <mail.me@reply.to.address> - 2011-06-18 06:05 -0500
  Re: Passing string pointers in a custom control-data structure == FAIL "A.D. Fundum" <what.ever@neverm.ind> - 2011-06-18 12:14 +0200
    Re: Passing string pointers in a custom control-data structure == FAIL "Alex Taylor" <mail.me@reply.to.address> - 2011-06-18 06:03 -0500
  Re: Passing string pointers in a custom control-data structure == FAIL "Alex Taylor" <mail.me@reply.to.address> - 2011-06-18 06:10 -0500
    Re: Passing string pointers in a custom control-data structure == FAIL Marcel Müller <news.5.maazl@spamgourmet.com> - 2011-06-20 09:55 +0200
      Re: Passing string pointers in a custom control-data structure == FAIL "Alex Taylor" <mail.me@reply.to.address> - 2011-06-20 09:01 -0500
        Re: Passing string pointers in a custom control-data structure == FAIL "Steven Levine" <steve53@nomail.earthlink.net> - 2011-06-20 10:50 -0500
          Re: Passing string pointers in a custom control-data structure == FAIL Marcel Müller <news.5.maazl@spamgourmet.com> - 2011-06-21 08:23 +0200
          Re: Passing string pointers in a custom control-data structure == FAIL "Alex Taylor" <mail.me@reply.to.address> - 2011-06-21 06:50 -0500
            Re: Passing string pointers in a custom control-data structure == FAIL "Steven Levine" <steve53@nomail.earthlink.net> - 2011-06-24 23:17 -0500
              Re: Passing string pointers in a custom control-data structure == FAIL "Alex Taylor" <mail.me@reply.to.address> - 2011-06-26 06:50 -0500
          The actual program "Alex Taylor" <mail.me@reply.to.address> - 2011-06-21 06:59 -0500
            Re: The actual program "Steven Levine" <steve53@nomail.earthlink.net> - 2011-06-24 14:42 -0500
              Re: The actual program "Alex Taylor" <mail.me@reply.to.address> - 2011-06-26 06:48 -0500
        Re: Passing string pointers in a custom control-data structure == FAIL Marcel Müller <news.5.maazl@spamgourmet.com> - 2011-06-21 08:39 +0200
    Re: Passing string pointers in a custom control-data structure == FAIL Paul Ratcliffe <abuse@orac12.clara34.co56.uk78> - 2011-06-20 09:30 +0000
  Re: Passing string pointers in a custom control-data structure == FAIL Peter Flass <Peter_Flass@Yahoo.com> - 2011-06-18 08:08 -0400
  Re: Passing string pointers in a custom control-data structure == FAIL Paul Ratcliffe <abuse@orac12.clara34.co56.uk78> - 2011-06-18 18:07 +0000
    Re: Passing string pointers in a custom control-data structure == FAIL "Alex Taylor" <mail.me@reply.to.address> - 2011-06-20 09:01 -0500
      Re: Passing string pointers in a custom control-data structure == FAIL "Lars Erdmann" <lars.erdmann@arcor.de> - 2011-06-22 22:22 +0200
      Re: Passing string pointers in a custom control-data structure == FAIL Marty <net@comcast.martyamodeo> - 2011-06-24 10:45 -0700
        Re: Passing string pointers in a custom control-data structure == FAIL "Rich Walsh" <spamyourself@127.0.0.1> - 2011-06-25 03:04 +0000
          Re: Passing string pointers in a custom control-data structure == FAIL "Steven Levine" <steve53@nomail.earthlink.net> - 2011-06-24 22:43 -0500
            Re: Passing string pointers in a custom control-data structure == FAIL "Rich Walsh" <spamyourself@127.0.0.1> - 2011-06-26 07:11 +0000
  Re: Passing string pointers in a custom control-data structure == FAIL James Moe <jimoeDESPAM@sohnen-moe.com> - 2011-06-18 21:43 -0700

csiph-web