Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MJ2: realloc is misused and may leak memory #168

Closed
gcode-importer opened this issue Aug 22, 2012 · 4 comments
Closed

MJ2: realloc is misused and may leak memory #168

gcode-importer opened this issue Aug 22, 2012 · 4 comments
Assignees
Labels
bug Priority-Low removed_components Issues that affect MJ2, JPWL or JP3D wontfix

Comments

@gcode-importer
Copy link

Originally reported on Google Code with ID 168

One shall never write
   p = realloc(p, len);

but 
   p2 = realloc(p, len);
   if (!p2) { handle the error/free the memory/...}

Reported by LucHermitte on 2012-08-22 18:41:10

@gcode-importer
Copy link
Author

Most calls to realloc have been fixed in r1896.

Somebody should have a look at libopenjpeg/t2.c, I'm not sure whether bio shall be
destroyed or left alone at 3 lines in t2_decode_packet().

Reported by LucHermitte on 2012-08-22 18:47:45

  • Status changed: Started

@gcode-importer
Copy link
Author

luc the code base changed quite a lot, I cannot find the realloc call you are talking
about. I am closing the issue for now, please re-open if you can find it in current
openjpeg codebase.

Reported by malaterre on 2014-02-26 16:23:05

  • Status changed: WontFix
  • Labels added: Milestone-Release2.1

@gcode-importer
Copy link
Author

Indeed, I had a quick look to the current code base. I've just found a few remaining
misuses in openmj2/j2k.c.

Reported by LucHermitte on 2014-02-27 17:25:11

@gcode-importer
Copy link
Author

could you provide a patch, and or outline the lines ?

Reported by malaterre on 2014-03-07 15:14:01

  • Status changed: Accepted
  • Labels added: Priority-Low
  • Labels removed: Priority-Medium, Milestone-Release2.1

@gcode-importer gcode-importer self-assigned this Jun 11, 2015
@rouault rouault added wontfix removed_components Issues that affect MJ2, JPWL or JP3D labels May 6, 2021
@rouault rouault closed this as completed May 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Priority-Low removed_components Issues that affect MJ2, JPWL or JP3D wontfix
Projects
None yet
Development

No branches or pull requests

2 participants