Corrupted Memory Issues - APar_FindAtom & APar_PrintAtomicTree

Issue #5 resolved
created an issue

In file parsley.cpp on line 703:

sscanf(search_atom_name+5, "%hhu", &desired_index);

Causes the stack around the variable desired_index to be corrupted. This reads 32 bits into an 8 bit field. Changing the delcaration of desired_index to uint32_t fixes the problem.

In file metalist.cpp on line 1450:

unsigned char unpacked_lang[3];

The array should be 4 bytes, not 3, as the following statement APar_UnpackLanguage writes 4 bytes to this field.

Comments (9)

  1. rogerwilson reporter

    I'd be glad to create a fork, I'm just not sure how. How do you upload/download changesets? Originally I got the source zip file. Is there a client side tool for check-in/check-out?

  2. rogerwilson reporter

    Great! Thanks! I'll take a look at it and will submit future changes that way. Right now, I'm under the gun to get some things complete by Friday and then I'm out on location next week. For now, if you could just search the files or go to the listed line numbers, it should make sense.

  3. Santino Fuentes

    Yea ok. I just know wez doesn't like the patches like that. I use this program everyday so the more perfect it is the better! I had a fork but I deleted it once wez took my upstream fixes.

    Thank you, looking forward to fixes.

  4. Wez Furlong repo owner

    It will definitely be much easier to merge your changes via a fork here on bitbucket; I anticipate having to juggle some files around in the repo to get it happy on both windows and unixy systems.


  5. Anonymous


    I believe you need to put a

    1. ifndef
    2. endif

    around " #define DEVICE_TYPE ULONG" in the file AP_CDTOC.h

    The redefinition was causing a seg. fault on my Windows PC (compiling with VC++). The code was redefining the DEVICE_TYPE to ULONG from DWORD.

    That was the only redefinition I saw, but it may be wise to put #ifndef around the other definitions as well.

  6. Log in to comment