This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: User env not set on chrootshell


%% EJS <ejshoor@yahoo.com> writes:

  e> It seems that die2 doesn't like to take anything other
  e> than a string?? Hence attempt at a cast.

Well, you can't cast an int to a char* and get anything useful
back... this ain't Perl :-).

You'll just get a bogus pointer that will crash your program.

  e> chrootshell.c: In function `main':
  e> chrootshell.c:132: warning: passing arg 3 of `_die'
  e> makes pointer from integer without a cast

Are you sure you also changed the %-format character in the string from
%s (string) to %lu or some variant of that?

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <psmith@nortel.com>           HASMAT: HA Software Mthds & Tools
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist
-------------------------------------------------------------------------------
        These are my opinions--Nortel takes no responsibility for them.

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]