Article View: comp.mail.misc
Article #5478Re: What does %u mean to smail 3?
From: Randy ORRISON
Date: Wed, 10 Jan 1990 18:18
Date: Wed, 10 Jan 1990 18:18
26 lines
1559 bytes
1559 bytes
In article <110@puzzle.UUCP> news@puzzle.UUCP (newshound) writes:
| What significance does %u have to smail 3? I sent a mail message
| to someone at uokmax.ecn.uoknor.edu, using this form:
| username%uokmax.ecn.uoknor.edu@my_backbone
| and it was resolved to
| username2155879098okmax.ecn.uoknor.edu@my_backbone
Without looking at the source, I would be willing to bet that somewhere
in smail3 is a line like this:
printf(address);
The '%u' in the address is being interpreted by printf as a format
specification for an unsigned int, and it's grabbing garbage off the
stack to put in there. The solution, of course, is to not use an
address as a format string. Either printf("%s",address), or even
better, fputs(address,stdout) will do what is needed.
Disclaimer: This is a great way to look like a fool if I'm wrong.
-randy
--
Randy C. Orrison -- Just an employee of Microsoft Corp, not a spokesman
uunet!microsoft!randyo microsoft!cctb!randy randy@cctb.wa.com
In 1869 the waffle iron was invented
for people who had wrinkled waffles.
Technical Details
Message-ID:
<10217@microsoft.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!microsoft!randyoReferences:
<110@puzzle.UUCP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!microsoft!randyo From: randyo@microsoft.UUCP (Randy ORRISON) Newsgroups: comp.mail.misc Subject: Re: What does %u mean to smail 3? Keywords: smail percent internet mail address Message-ID: <10217@microsoft.UUCP> Date: 10 Jan 90 18:18:12 GMT References: <110@puzzle.UUCP> Reply-To: randyo@microsoft.UUCP (Randy ORRISON) Organization: Learning Systems Development, Microsoft Lines: 26