/[winpt]/trunk/Src/wptKeylist.cpp
ViewVC logotype

Diff of /trunk/Src/wptKeylist.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 196 by twoaday, Wed Mar 22 11:04:20 2006 UTC revision 197 by twoaday, Mon Apr 10 07:38:06 2006 UTC
# Line 987  keylist_get_recipients (listview_ctrl_t Line 987  keylist_get_recipients (listview_ctrl_t
987      if (!ka)      if (!ka)
988          BUG (NULL);          BUG (NULL);
989    
990      keybuf = (gpgme_key_t*)calloc (n, sizeof (gpgme_key_t));      keybuf = (gpgme_key_t*)calloc (n+1, sizeof (gpgme_key_t));
991      if (!keybuf)      if (!keybuf)
992          BUG (NULL);          BUG (NULL);
993                    
# Line 998  keylist_get_recipients (listview_ctrl_t Line 998  keylist_get_recipients (listview_ctrl_t
998                  BUG (0);                  BUG (0);
999              if (!key_check_validity (key) &&              if (!key_check_validity (key) &&
1000                  !key_array_search (ka, ka_pos, key->subkeys->keyid)) {                  !key_array_search (ka, ka_pos, key->subkeys->keyid)) {
1001                  char *warn = new char[512+strlen (key->uids->uid) + 1];                  char *utf8_uid = utf8_to_native (key->uids->uid);
1002                    char *warn = new char[512+strlen (utf8_uid) + 1];
1003                  if (!warn)                  if (!warn)
1004                      BUG (0);                      BUG (0);
1005                  sprintf (warn,                  sprintf (warn,
# Line 1006  keylist_get_recipients (listview_ctrl_t Line 1007  keylist_get_recipients (listview_ctrl_t
1007                        "named in the user ID.  If you *really* know what you are\n"                        "named in the user ID.  If you *really* know what you are\n"
1008                        "doing, you may answer the next question with yes\n"                        "doing, you may answer the next question with yes\n"
1009                        "\n"                        "\n"
1010                        "Use \"%s\" anyway?"), key->uids->uid);                        "Use \"%s\" anyway?"), utf8_uid);
1011                  if (reg_prefs.always_trust)                  if (reg_prefs.always_trust)
1012                      rc = IDYES;                      rc = IDYES;
1013                  else                  else
# Line 1018  keylist_get_recipients (listview_ctrl_t Line 1019  keylist_get_recipients (listview_ctrl_t
1019                      strcpy (ka[ka_pos++].keyid, key->subkeys->keyid);                      strcpy (ka[ka_pos++].keyid, key->subkeys->keyid);
1020                      count++;                      count++;
1021                  }                  }
1022                    safe_free (utf8_uid);
1023                  free_if_alloc (warn);                  free_if_alloc (warn);
1024              }              }
1025              else {              else {
# Line 1061  keylist_enum_recipients (listview_ctrl_t Line 1063  keylist_enum_recipients (listview_ctrl_t
1063      n = listview_count_items (lv, 0);      n = listview_count_items (lv, 0);
1064      if (!n)      if (!n)
1065          return 0;          return 0;
1066      rset = (gpgme_key_t*)calloc (n, sizeof (gpgme_key_t));      rset = (gpgme_key_t*)calloc (n+1, sizeof (gpgme_key_t));
1067      if (!rset)      if (!rset)
1068          BUG (NULL);          BUG (NULL);
1069      for (i = 0; i < n; i++) {      for (i = 0; i < n; i++) {

Legend:
Removed from v.196  
changed lines
  Added in v.197

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26