Hi,
Thanks for working on this. I have a couple of comments though:
- The scope of the patch seems to expand beyond the original bug. Whilst
it's perfectly ok for you to fix the additional issues, would you mind
splitting those changes in to a separate patch? (I'm referring to the
cast you added in draw_window and the prototype change to main() ).
- You hardcode "%15s" in the prototype for sscanf, when you use a
constant everywhere else. Why not do something like this?
char *format ;
asprintf ( &format , "%%*s %%%ds" , PROCNAMELEN - 1 ) ;
sscanf ( buf , format , procName ) ;
free ( format ) ;
(Note that this doesn't make sure asprintf succeeded, which isn't good -
but it doesn't look like this application checks that any other call
succeeds either, so I'm not sure that matters so much here).
Let me know what you think, but I'd certainly sponsor this once you've
addressed the first point
** Changed in: gmemusage (Ubuntu)
Importance: Undecided => Medium
** Changed in: gmemusage (Ubuntu)
Status: New => Triaged
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/370735
Title:
terminated on stack smashing detected message
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs