[Pkg-privacy-commits] [pidgin-otr] 138/255: Change a malloc+strcpy into a strdup in process_receiving_im()
Ximin Luo
infinity0 at moszumanska.debian.org
Sat Aug 22 12:51:34 UTC 2015
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch experimental
in repository pidgin-otr.
commit 03f11def8d0123eb43b12ba4d6499c1d53baf34a
Author: Ian Goldberg <iang at cs.uwaterloo.ca>
Date: Thu Jul 19 08:53:00 2012 -0400
Change a malloc+strcpy into a strdup in process_receiving_im()
Thanks to Paul Wouters <paul at cypherpunks.ca> for the report.
---
otr-plugin.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/otr-plugin.c b/otr-plugin.c
index da93dbd..f9ba9f9 100644
--- a/otr-plugin.c
+++ b/otr-plugin.c
@@ -781,10 +781,7 @@ static gboolean process_receiving_im(PurpleAccount *account, char **who,
&newmessage, &tlvs, NULL, NULL, NULL);
if (newmessage) {
- char *ourm = malloc(strlen(newmessage) + 1);
- if (ourm) {
- strcpy(ourm, newmessage);
- }
+ char *ourm = strdup(newmessage);
otrl_message_free(newmessage);
free(*message);
*message = ourm;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/pidgin-otr.git
More information about the Pkg-privacy-commits
mailing list