Thread View: gnu.gcc.bug
1 messages
1 total messages
Started by Jay Snyder
Thu, 29 Mar 1990 08:02
GCC Bug under SCO Xenix/386
Author: Jay Snyder
Date: Thu, 29 Mar 1990 08:02
Date: Thu, 29 Mar 1990 08:02
39 lines
1422 bytes
1422 bytes
The following is a piece of code that I use for a primitive password encoding
scheme in my BBS software:
encodepw(pw,name)
char *pw,*name;
{
char i,ii;
ii=0x15;i=0;
while (*pw)
{
if (i>strlen(name)) i=0;
*pw=*pw^(0x1f & name[i++])^(i++);
*pw=*pw-5;
if (*pw<'!') *pw=*pw+32;
if (*pw==':') *pw='$';
++pw;
}
}
here is the output from input: name="Username", passwd="password"
output from cc code: "_bstyvoj"
output from gcc code: "`atszupi"
note that the gcc code is make each character of the output 1 less
numerically.
Anybody have any suggestions.
Also, I compiled the same code on an AT&T 3B15 running SYSV R3.1.1
and the results were the same as from cc on SCO.
My conclusion is that gcc has a bug.
--
====================================================
Jay A. Snyder jsnyder@lehi3b15.csee.lehigh.edu
CSEE Dept. jsnyder%gdx@lehi3b15.csee.lehigh.edu
Lehigh University
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads