Menu

#3 Some blobs not read correctly due to using signed variable.

closed-fixed
nobody
None
5
2005-08-11
2005-04-01
Pat Tjin
No

Patch to fix blob handling

--- paradox.c Wed Dec 22 11:52:42 2004
+++ ../../pxlib-0.4.3p/src/paradox.c Fri Apr 1 15:12:47
2005
@@ -1871,13 +1871,13 @@ PX_has_blob_file(pxdoc_t
*pxdoc) {
* Reads data of blob into memory and returns a pointer
to it
*/
static char*
_px_read_blobdata(pxblob_t *pxblob, const char *data,
int len, int hsize, int *mod, int *blobsize) {
int ret;
char *blobdata;
- char head[12];
+ unsigned char head[12];
pxdoc_t *pxdoc = pxblob->pxdoc;
size_t size, offset, mod_nr, index;
int leader = len - 10;

size = get_long_le(&data[leader+4]);
if(hsize == 17)
@@ -2261,13 +2261,13 @@ PX_get_data_bcd(pxdoc_t
*pxdoc, unsigned
* for all other types of blobs (I'm not completely sure
about OLE).
*/
static int
_px_get_data_blob(pxdoc_t *pxdoc, const char *data,
int len, int hsize, int *mod, int *blobsize, char **value) {
int ret;
char *blobdata;
- char head[20];
+ unsigned char head[20];
pxblob_t *pxblob = pxdoc->px_blob;
size_t size, offset, mod_nr, index;
int leader = len - 10;

/* FIXME: This is a quick hack because graphic
blobs have some extra
* 8 Bytes before the data which is contained in
the size

Discussion

  • Pat Tjin

    Pat Tjin - 2005-04-01

    diff for patch

     
  • Uwe Steinmann

    Uwe Steinmann - 2005-08-11
    • status: open --> closed-fixed
     
  • Uwe Steinmann

    Uwe Steinmann - 2005-08-11

    Logged In: YES
    user_id=137306

    Finally fixed in version 0.5.1.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.