Re: Date bug.

From: Bianca (blah_at_no.mail)
Date: 12/23/04


Date: Thu, 23 Dec 2004 12:18:12 +0800


Dave <recneps.w.divad@elcaro.moc> schreef in berichtnieuws
qBbyd.5$Tg5.65@news.oracle.com...
>
>
> Bianca wrote:
> > Got an old dos proggy (exe file, no source av), problem there is if current
date
> > is given, it gives an error message that the date must be between 1974 and
1999.
> >
> > So, the exe file need to be modified, somewhere...
> >
> > Any hints how that part of the code that does the date check can look like?
> > As for now it is all abracadabra since it is not in plain text.
>
>
> Simple. Find the error message in the string table, then find the
> pointer to that string in the code. Work backwards from the pointer and
> find the test that causes the pointer to be dereferenced. The test
> could be a number of things - a string compare, a less-than, a
> less-than-or-equal, and it could be comparing 1999, 2000, 99 or a few
> other possibilities. If it's a less-than, simply change the value it's
> comparing and that should stop the error appearing.
>
> The check probably prevents some bugs in date calculations further down
> the code though. It'll be a bit harder to fix those bugs.
>
> Although you say "no source", in fact you can get source from it - just
> disassemble it and you'll have assembly source. Assembly is a bit
> harder than most 3GLs/4GLs, but it's not impossible. Plus there's a
> good chance the program won't be longer than a few hundred K, so that
> should help.
>
> You might find OllyDbg useful.
>
> Dave.

Tnx for reply.

OllyDbg seems usefull, but, it is no 32bit so Olly does not load the proggy...

Phew, glad it's simple!

Found in a normal editor the error message, the digits of the year are showed as
'%s' with in front of that line some address 00035something.

How can I disassemble it (what prog?), and bring it back to a normal (and
working) *.exe file?

Newbie question: what's 3GLs/4GLs ?

Reply to the hint to change the date on the system is no option...
The date is printed, so I still get a wacko date on the form.

;o)



Relevant Pages

  • Re: Windows picture and fax viewer - system cannot find shimgvw.dll (but it is there!)
    ... combination of loading Service Pack 1 and restoring system to earlier dates. ... > error message that the system cannot find the file ... > My first post to this group - many thanks for any help. ... > - Dave ...
    (microsoft.public.windowsxp.photos)
  • Re: Text Marked with "Do not check ....."Spell Check
    ... "Dave" wrote: ... (Bummer - now that I want the error message I can't get ... My spell check message gremlin has returned. ... "Do not check spelling or grammar" was skipped. ...
    (microsoft.public.word.newusers)
  • Le TREC - Result
    ... Got to the yard yesterday and was welcomed by a muddy bog monster, ... Bramble came out and when Dave went it, he started again, wehn Dave ... came out and we went in, poor Pointer eyes were on stalks. ... nowhere near it, so left it at that, exit fast! ...
    (uk.rec.equestrian)
  • Re: Python less error-prone than Java
    ... Your crash can tell you that it was a null ... Your crash can tell you that you stomped over memory. ... tell the difference between null pointer and wrong type. ... but what if you somehow lose the error message and get only ...
    (comp.lang.python)
  • Re: Unexplained label behavior
    ... > "Dave the wave" wrote in message ... >> The error message is: ... >> subform, ... >>>> set the labels to the text box values and figured the problem was ...
    (microsoft.public.access.formscoding)