Gitweb links:

...log 
http://git.netsurf-browser.org/netsurf.git/shortlog/f04103398b284b9defb85c98d3079b0dfc43a15e
...commit 
http://git.netsurf-browser.org/netsurf.git/commit/f04103398b284b9defb85c98d3079b0dfc43a15e
...tree 
http://git.netsurf-browser.org/netsurf.git/tree/f04103398b284b9defb85c98d3079b0dfc43a15e

The branch, master has been updated
       via  f04103398b284b9defb85c98d3079b0dfc43a15e (commit)
      from  407e58406b7a89b9c15a7e40c9b2bc26b866f31e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commitdiff 
http://git.netsurf-browser.org/netsurf.git/commit/?id=f04103398b284b9defb85c98d3079b0dfc43a15e
commit f04103398b284b9defb85c98d3079b0dfc43a15e
Author: Chris Young <[email protected]>
Commit: Chris Young <[email protected]>

    Avoid leaking memory when typing

diff --git a/frontends/amiga/gui.c b/frontends/amiga/gui.c
index f849f3b..ae2d4df 100644
--- a/frontends/amiga/gui.c
+++ b/frontends/amiga/gui.c
@@ -1338,8 +1338,9 @@ int ami_key_to_nskey(ULONG keycode, struct InputEvent *ie)
                break;
                default:
                        if((chars = MapRawKey(ie,buffer,20,NULL)) > 0) {
-                               utf8_from_local_encoding(buffer, chars, &utf8);
+                               if(utf8_from_local_encoding(buffer, chars, 
&utf8) != NSERROR_OK) return 0;
                                nskey = utf8_to_ucs4(utf8, 
utf8_char_byte_length(utf8));
+                               free(utf8);
 
                                if(ie->ie_Qualifier & IEQUALIFIER_RCOMMAND) {
                                        switch(nskey) {


-----------------------------------------------------------------------

Summary of changes:
 frontends/amiga/gui.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/frontends/amiga/gui.c b/frontends/amiga/gui.c
index f849f3b..ae2d4df 100644
--- a/frontends/amiga/gui.c
+++ b/frontends/amiga/gui.c
@@ -1338,8 +1338,9 @@ int ami_key_to_nskey(ULONG keycode, struct InputEvent *ie)
                break;
                default:
                        if((chars = MapRawKey(ie,buffer,20,NULL)) > 0) {
-                               utf8_from_local_encoding(buffer, chars, &utf8);
+                               if(utf8_from_local_encoding(buffer, chars, 
&utf8) != NSERROR_OK) return 0;
                                nskey = utf8_to_ucs4(utf8, 
utf8_char_byte_length(utf8));
+                               free(utf8);
 
                                if(ie->ie_Qualifier & IEQUALIFIER_RCOMMAND) {
                                        switch(nskey) {


-- 
NetSurf Browser

_______________________________________________
netsurf-commits mailing list
[email protected]
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org

Reply via email to