Hylafax Developers Mailing List Archives
|
[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
[hylafax-devel] Re: **BUG** DestControls broken
Darren Nickerson <darren@dazza.org> writes:
> Okay, here's what happens to faxq when I try to submit a job with a DestControl active:
>
> [root@hewes fax]# gdb faxq
> GNU gdb 19991004
> Copyright 1998 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB. Type "show warranty" for details.
> This GDB was configured as "i386-redhat-linux"...
> (gdb) run -D
> Starting program: /usr/sbin/faxq -D
> Assertion failed "Invalid Str[] index", file "../util/Str.h" line 120.
>
> Program received signal SIGABRT, Aborted.
> 0x40201d41 in __kill () from /lib/libc.so.6
> Current language: auto; currently c
> (gdb) where
> #0 0x40201d41 in __kill () from /lib/libc.so.6
> #1 0x402019b6 in raise (sig=6) at ../sysdeps/posix/raise.c:27
> #2 0x402030d8 in abort () at ../sysdeps/generic/abort.c:88
> #3 0x40041c70 in _fxassert () from /usr/lib/libfaxserver.so
> #4 0x804d75b in crackArgv (s=@0xbffff138) at DestControl.c++:227
> #5 0x804da03 in DestControl::parseEntry (this=0x8064534, fp=0x807fa20)
> at DestControl.c++:270
> #6 0x804d64c in DestControl::readContents (this=0x8064534)
> at DestControl.c++:184
> #7 0x804d59d in DestControl::operator[] (this=0x8064534, canon=@0x806c71c)
> at DestControl.c++:167
> #8 0x8055fc8 in faxQueueApp::runScheduler (this=0x80644e0)
> at faxQueueApp.c++:2037
> #9 0x805141d in faxQueueApp::SchedTimeout::timerExpired (this=0x8064700)
> at faxQueueApp.c++:72
> #10 0x400a894c in TimerQueue::expire () from /usr/lib/libfaxutil.so
> #11 0x400a9645 in Dispatcher::notify () from /usr/lib/libfaxutil.so
> #12 0x400a9205 in Dispatcher::dispatch () from /usr/lib/libfaxutil.so
> #13 0x400a9084 in Dispatcher::dispatch () from /usr/lib/libfaxutil.so
> #14 0x8058734 in main (argc=2, argv=0xbffff984) at faxQueueApp.c++:3084
> (gdb)
>
> incidentally faxq is fine when there's no jobs in the queue . . . and
> once a job is in the queue I'm unable to restart faxq . . . same death as
> above.
It dies here:
static void
crackArgv(fxStr& s)
{
int i = 0;
u_int l = s.length()+1; // +1 for \0
do {
while (s[i] && !isspace(s[i])) i++;
>--------------^^^^
if (s[i] == '\0') break;
s[i++] = '\0';
int j = i;
while (isspace(s[j])) j++;
if (j > i) {
s.remove(i, j-i);
}
} while (s[i] != '\0');
s.resize(i);
}
I don't see any obvious errors in this function (although "l" is never used
:-)). Maybe to add some tracing commands, printing s and i and see what's
really happen?
Hope to hear from you soon,
Dmitry
____________________ HylaFAX(tm) Developers Mailing List ____________________
To unsub: mail -s unsubscribe hylafax-devel-request@hylafax.org < /dev/null