From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,LOTS_OF_MONEY autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,9e1f931c6a61f4be,start X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit From: Jean-Pierre Rosen Newsgroups: comp.lang.ada Subject: Ammunition for strong typing... Date: Mon, 20 Jul 2009 09:49:14 +0200 Organization: Adalog Message-ID: <1i714h.3hs.ln@hunter.axlog.fr> NNTP-Posting-Host: mailhost.axlog.fr Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: s1.news.oleane.net 1248066375 6008 195.25.228.57 (20 Jul 2009 05:06:15 GMT) X-Complaints-To: abuse@oleane.net NNTP-Posting-Date: Mon, 20 Jul 2009 05:06:15 +0000 (UTC) User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) Path: g2news2.google.com!news4.google.com!feeder.news-service.com!de-l.enfer-du-nord.net!usenet-fr.net!feed.ac-versailles.fr!oleane.net!oleane!hunter.axlog.fr!nobody Xref: g2news2.google.com comp.lang.ada:7163 Date: 2009-07-20T09:49:14+02:00 List-Id: Seen on SlashDot (http://it.slashdot.org/story/09/07/15/2050215/Software-Glitch-Leads-To-23148855308184500-Visa-Charges?from=rss) Recently several Visa card holders were, um, overcharged for certain purchases, to the tune of $23,148,855,308,184,500.00 on a single charge. The company says it was due to a programming error, and that the problem has been corrected. What is interesting is that the amount charged actually reveals the type of programming error that caused the problem. 23,148,855,308,184,500.00 * 100 (I'm guessing this is how the number is actually stored) is 2314885530818450000. Convert 2314885530818450000 to hexadecimal, and you end up with 20 20 20 20 20 20 12 50. Most C/C++ programmers see the error now ... hex 20 is a space. So spaces were stuffed into a field where binary zero should have been. -- --------------------------------------------------------- J-P. Rosen (rosen@adalog.fr) Visit Adalog's web site at http://www.adalog.fr