Package: bidwatcher
Version: 1.3.17-1
Followup-For: Bug #318506
Hi,
this is a quick patch which temporarily fixes the issue. Most information seems
to be parsed as usual again (I guess -- since this is the first time I'm using
this program :)
I haven't done any testing of the bidding functionality, but I'm highly
suspicious that this would be broken as well. Also, shipping costs don't seem
to be retrieved, and I'm pretty sure that the cars/motors magic has been lost.
Note that this also addresses the Description[] buffer overflow from another
bug report.
best,
Antoine
-- System Information:
Debian Release: testing/unstable
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.12.3
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Versions of packages bidwatcher depends on:
ii libc6 2.3.2.ds1-22 GNU C Library: Shared libraries an
ii libcurl3 7.14.0-2 Multi-protocol file transfer libra
ii libgcc1 1:4.0.1-2 GCC support library
ii libglib1.2 1.2.10-10 The GLib library of C routines
ii libgtk1.2 1.2.10-17 The GIMP Toolkit set of widgets fo
ii libidn11 0.5.13-1.0 GNU libidn library, implementation
ii libssl0.9.7 0.9.7e-3 SSL shared libraries
ii libstdc++5 1:3.3.5-13 The GNU Standard C++ Library v3
ii libx11-6 4.3.0.dfsg.1-14 X Window System protocol client li
ii libxext6 4.3.0.dfsg.1-14 X Window System miscellaneous exte
ii libxi6 4.3.0.dfsg.1-14 X Window System Input extension li
ii xlibs 4.3.0.dfsg.1-14 X Keyboard Extension (XKB) configu
ii zlib1g 1:1.2.2-4 compression library - runtime
bidwatcher recommends no packages.
-- no debconf information
*** bidwatcher.patch
diff -uw bidwatcher-1.3.17/helpers.cpp bidwatcher-1.3.17-NEW/helpers.cpp
--- bidwatcher-1.3.17/helpers.cpp 2005-02-18 05:46:49.000000000 +0100
+++ bidwatcher-1.3.17-NEW/helpers.cpp 2005-08-09 23:48:30.000000000 +0200
@@ -1066,20 +1066,22 @@
* but that's not what I'm going to do right now.
* Thanks to Bob Beaty!
*/
- scratch = strstr(Buff, ") -");
+ // Update, August 2005: web page format seems to have changed, so we now
+ // parse the description from the page title, which is in the format
+ // "eBay: %DESCRIPTION% (item %n end time %t)" -AB
+ scratch = strstr(Buff, "eBay: ");
if (scratch != NULL) {
- // move past the ") -"
- scratch += 3;
- // move past any whitespace
- while (isspace(*scratch)) scratch++;
- // copy over the description to a newline
+ // move past the prefix string
+ scratch += 6;
+ // copy over the description while buffer lasts (it's 129 bytes)
idx = 0;
- while (*scratch != '\n') {
+ while (idx < 128 && strncmp(scratch, " (item ", 7)) {
Description[idx++] = *scratch++;
}
// NULL terminate the description I just parsed off
Description[idx] = '\0';
} else {
+ DPRINTF(DHIGH, ("Failed to read item description.\n"));
return FALSE;
}
@@ -1088,17 +1090,19 @@
memset(LineBuffer.buf(), 0, LineBuffer.size());
- while(strstr(LineBuffer.buf(),"eBay")==NULL && streamBuff)
+ while(strstr(LineBuffer.buf(),Description)==NULL && streamBuff)
streamBuff.getline(LineBuffer.buf(), LineBuffer.size(), '\n');
+ /*
if (strstr(LineBuffer.buf(),"eBay item") == NULL)
if (strstr(LineBuffer.buf(),"eBay Motors item") == NULL)
return FALSE;
+ */
if (strstr(LineBuffer.buf(),"eBay Motors item") != NULL)
auc_type = TYPE_EBAYMOTORSCAR;
- while(strstr(LineBuffer.buf(),") -")==NULL && streamBuff)
+ // while(strstr(LineBuffer.buf(),") -")==NULL && streamBuff)
streamBuff.getline(LineBuffer.buf(), LineBuffer.size(), '\n');
if ( strstr(LineBuffer.buf(),"Another buyer used Buy It Now to purchase the
item immediately") == NULL ){
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]