Re: [htdig3-dev] htsearch minimum check for matchesperpage variable


Gilles Detillieux (grdetil@scrc.umanitoba.ca)
Thu, 1 Apr 1999 11:44:08 -0600 (CST)


According to Gabriele Bartolini:
> Here is a little patch for htsearch. In fact to check the value of
> matchesperpage I had to insert a javascript inside my form. Else, if user
> would have inserted a non int value (or non positive value), htsearch would
> have crashed.
>
> With this minimal control, we check for a valid positive value of it.
>
> This is my propose: any Idea?

Yes, on 0 or non-int (which atoi treats as 0), htsearch gets a divide by
zero error. Negatives don't cause a crash, but don't give any output
either. I'll add your patch to 3.1.2, but I'll also patch Display.cc,
in case the error is in htdig.conf's matches_per_page attribute.

Good call! Thanks.

> Ciao a tutti
> e Buona Pasqua
>
> (Ciao to all of you and have a happy Easter)

Joyeuses Pâques!

-- 
Gilles R. Detillieux              E-mail: <grdetil@scrc.umanitoba.ca>
Spinal Cord Research Centre       WWW:    http://www.scrc.umanitoba.ca/~grdetil
Dept. Physiology, U. of Manitoba  Phone:  (204)789-3766
Winnipeg, MB  R3E 3J7  (Canada)   Fax:    (204)789-3930
------------------------------------
To unsubscribe from the htdig3-dev mailing list, send a message to
htdig3-dev@htdig.org containing the single word "unsubscribe" in
the SUBJECT of the message.



This archive was generated by hypermail 2.0b3 on Thu Apr 01 1999 - 10:01:53 PST