# HG changeset patch # User Jan D. # Date 1267367571 -3600 # Node ID 4f44eaade84eaf9ec2a9bbb131fcdaa6e484de74 # Parent 68e6039c08f1b88295101afde76128b5c54e2ae3# Parent d8f04397b77a52dadd97fbbde091e65ecf8b6b50 Merge from trunk diff -r 68e6039c08f1 -r 4f44eaade84e lisp/ChangeLog --- a/lisp/ChangeLog Sun Feb 28 11:41:52 2010 +0100 +++ b/lisp/ChangeLog Sun Feb 28 15:32:51 2010 +0100 @@ -1,3 +1,9 @@ +2010-02-28 Michael Albinus + + * net/tramp.el (tramp-handle-write-region): START can be a string. + Take care in the checks. Reported by Dan Davison + . + 2010-02-28 Michael Albinus * net/dbus.el (dbus-introspect, dbus-get-property) diff -r 68e6039c08f1 -r 4f44eaade84e lisp/net/tramp.el --- a/lisp/net/tramp.el Sun Feb 28 11:41:52 2010 +0100 +++ b/lisp/net/tramp.el Sun Feb 28 15:32:51 2010 +0100 @@ -5045,11 +5045,12 @@ ;; encoding function, then that is used for encoding the ;; contents of the tmp file. (cond - ;; `rename-file' handles direct copy and out-of-band methods. + ;; `copy-file' handles direct copy and out-of-band methods. ((or (tramp-local-host-p v) (tramp-method-out-of-band-p - v (- (or end (point-max)) (or start (point-min))))) - (if (and (= (or end (point-max)) (point-max)) + v (nth 7 (file-attributes tmpfile)))) + (if (and (not (stringp start)) + (= (or end (point-max)) (point-max)) (= (or start (point-min)) (point-min)) (tramp-get-method-parameter method 'tramp-copy-keep-tmpfile)) diff -r 68e6039c08f1 -r 4f44eaade84e src/ChangeLog --- a/src/ChangeLog Sun Feb 28 11:41:52 2010 +0100 +++ b/src/ChangeLog Sun Feb 28 15:32:51 2010 +0100 @@ -1,3 +1,9 @@ +2010-02-28 Chong Yidong + + * charset.c (load_charset_map_from_file) + (load_charset_map_from_vector): Zero out allocated + charset_map_entries before using them. + 2010-02-27 Andreas Schwab * w32uniscribe.c (uniscribe_check_otf): Fix length check. diff -r 68e6039c08f1 -r 4f44eaade84e src/charset.c --- a/src/charset.c Sun Feb 28 11:41:52 2010 +0100 +++ b/src/charset.c Sun Feb 28 15:32:51 2010 +0100 @@ -531,6 +531,7 @@ SAFE_ALLOCA (head, struct charset_map_entries *, sizeof (struct charset_map_entries)); entries = head; + bzero (entries, sizeof (struct charset_map_entries)); n_entries = 0; eof = 0; @@ -557,6 +558,7 @@ SAFE_ALLOCA (entries->next, struct charset_map_entries *, sizeof (struct charset_map_entries)); entries = entries->next; + bzero (entries, sizeof (struct charset_map_entries)); } idx = n_entries % 0x10000; entries->entry[idx].from = from; @@ -596,6 +598,7 @@ SAFE_ALLOCA (head, struct charset_map_entries *, sizeof (struct charset_map_entries)); entries = head; + bzero (entries, sizeof (struct charset_map_entries)); n_entries = 0; for (i = 0; i < len; i += 2) @@ -632,6 +635,7 @@ SAFE_ALLOCA (entries->next, struct charset_map_entries *, sizeof (struct charset_map_entries)); entries = entries->next; + bzero (entries, sizeof (struct charset_map_entries)); } idx = n_entries % 0x10000; entries->entry[idx].from = from;