[PATCH v2 0/1] Improvements and fixes to calculation of sizes

Alejandro Colomar via Mutt-dev <[email protected]>
Newsgroups gmane.mail.mutt.devel
Message-ID <[email protected]>
Hi!

Here's a revision of the first patch (the second one was already
applied).

Changes since v1:

	-  Reword commit message.  [Greg]
	-  Remove #include.  [Kevin]

See range-diff below.  (Remember to amend the author. :)


Have a lovely day!
Alex


Alejandro Colomar (1):
  enter.c: Use wmem*() functions with wide-character strings

 enter.c | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

Range-diff against v1:
1:  465585daa48b ! 1:  f7b2b1491bbf enter.c: Use wmem*() functions with wide-character strings
    @@ Metadata
      ## Commit message ##
         enter.c: Use wmem*() functions with wide-character strings
     
    -    This avoids an explicit size multiplication, which can overflow the
    -    calculation.
    +    This improves readability, and makes it more type safe (wmemcpy(3)
    +    doesn't use void*).
     
         Signed-off-by: Alejandro Colomar <[email protected]>
    -    Cherry-picked-from: neomutt.git 7df621a105e2 (2024-05-09, "Use wmem*() functions with wide-character strings")
    -    [alx: Adapted diff and message to mutt(1)]
    +    Cherry-picked-from: neomutt.git 7df621a105e2 (2024-05-09; "Use wmem*() functions with wide-character strings")
    +    [alx: Adapted diff to mutt; changed commit message]
    +    Cc: Greg KH <[email protected]>
         Signed-off-by: Alejandro Colomar <[email protected]>
     
      ## enter.c ##
    -@@
    - #include "buffy.h"
    - 
    - #include <string.h>
    -+#include <wchar.h>
    - 
    - /* redraw flags for mutt_enter_string() */
    - enum
     @@ enter.c: static void replace_part (ENTER_STATE *state, size_t from, char *buf)
        if (savelen)
        {
2:  1031be98373b < -:  ------------ crypt.c: Fix allocation size calculation

base-commit: cb33fbfe1b753f6cc6d70f39fc201e43d196e555
-- 
2.51.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.