Changeset 383 for trunk/src/sh_gpg.c
- Timestamp:
- Dec 5, 2011, 10:30:33 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/sh_gpg.c
r347 r383 173 173 174 174 k = 0; 175 for (i = 0; i < 127; ++i) 176 { 177 if (test_ptr2[i] == '\0') 178 break; 179 if (test_ptr2[i] != ' ') 180 { 181 wstrip2[k] = test_ptr2[i]; 182 ++k; 175 if (test_ptr2) 176 { 177 for (i = 0; i < 127; ++i) 178 { 179 if (test_ptr2[i] == '\0') 180 break; 181 if (test_ptr2[i] != ' ') 182 { 183 wstrip2[k] = test_ptr2[i]; 184 ++k; 185 } 183 186 } 184 187 } … … 552 555 pfd = val_return; 553 556 sl_close(checkfd); 554 checkfd = -1;557 /* checkfd = -1; *//* never read */ 555 558 556 559 sl_snprintf(pname, sizeof(pname), _("/proc/self/fd/%d"), pfd); … … 815 818 { 816 819 sl_strlcpy (sign_id, &line[25], SH_MINIBUF+1); 817 sign_id[sl_strlen(sign_id)-1] = '\0'; /* remove trailing '"' */ 820 if (sign_id) 821 sign_id[sl_strlen(sign_id)-1] = '\0'; /* remove trailing '"' */ 818 822 have_id = GOOD; 819 823 } … … 839 843 ptr = strchr ( line, '"'); 840 844 ++ptr; 841 sl_strlcpy (sign_id, ptr, SH_MINIBUF+1); 842 sign_id[sl_strlen(sign_id)-1] = '\0'; /* remove trailing dot */ 843 sign_id[sl_strlen(sign_id)-2] = '\0'; /* remove trailing '"' */ 845 if (ptr) 846 { 847 sl_strlcpy (sign_id, ptr, SH_MINIBUF+1); 848 sign_id[sl_strlen(sign_id)-1] = '\0'; /* remove trailing dot */ 849 sign_id[sl_strlen(sign_id)-2] = '\0'; /* remove trailing '"' */ 850 } 851 else 852 { 853 sl_strlcpy (sign_id, _("(null)"), SH_MINIBUF+1); 854 } 844 855 have_id = GOOD; 845 856 }
Note:
See TracChangeset
for help on using the changeset viewer.