Ticket #1813 (closed enhancement: wontfix)
Statifc buffer version of name_quote()
Reported by: | metux | Owned by: | metux |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | mc-core | Version: | 4.7.0-pre4 |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Branch state: | Votes for changeset: |
Description
name_quote(), which returns a newly allocated string, is used in many places where a static buffer (eg. on stack) would be fully sufficient.
Change History
comment:2 Changed 15 years ago by andrew_b
And what size of that static buffer will be fully sufficient?
comment:4 Changed 15 years ago by andrew_b
- What about potential buffer overflow in execute_menu_command() (src/user.c:654)? User's input parameter is not length-limited.
- The static buffer is effective when you allocate and free some piece of memory very often, many (hundred or thousand) times per second. But name_quote() is called once in each place where it's called.
Note: See
TracTickets for help on using
tickets.