Changeset 44a61ac


Ignore:
Timestamp:
Feb 11, 2009, 12:20:21 PM (11 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, debian, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
2101a50
Parents:
8412869
git-author:
Nelson Elhage <nelhage@mit.edu> (02/08/09 20:07:00)
git-committer:
Nelson Elhage <nelhage@mit.edu> (02/11/09 12:20:21)
Message:
zwrite.c: Fix an unsafe use of sprintf.

Reported-By: Geoffrey Thomas <geofft@mit.edu>
File:
1 edited

Legend:

Unmodified
Added
Removed
  • zwrite.c

    rb9cb41b r44a61ac  
    195195{
    196196  int i, j;
    197   char to[LINE];
     197  char *to;
    198198
    199199  if (z->noping) return;
     
    209209  for (i=0; i<j; i++) {
    210210    if (strcmp(z->realm, "")) {
    211       sprintf(to, "%s@%s", (char *) owl_list_get_element(&(z->recips), i), z->realm);
     211      to = owl_sprintf("%s@%s", (char *) owl_list_get_element(&(z->recips), i), z->realm);
    212212    } else {
    213       strcpy(to, owl_list_get_element(&(z->recips), i));
     213      to = owl_strdup(owl_list_get_element(&(z->recips), i));
    214214    }
    215215    send_ping(to);
     216    owl_free(to);
    216217  }
    217218
Note: See TracChangeset for help on using the changeset viewer.