View | Details | Raw Unified | Return to bug 98496
Collapse All | Expand All

(-)hypermail-2.2.0.20070131.orig/src/parse.c (-2 / +6 lines)
Lines 48-53 Link Here
48
#include <sys/dir.h>
48
#include <sys/dir.h>
49
#endif
49
#endif
50
50
51
#ifdef HAVE_STRING_H
52
#include <string.h>
53
#endif
54
51
/*
55
/*
52
** LCC doesn't have lstat() defined in sys/stat.h.  We'll define it
56
** LCC doesn't have lstat() defined in sys/stat.h.  We'll define it
53
** in lcc_extras.h, but really it just calls stat().
57
** in lcc_extras.h, but really it just calls stat().
Lines 862-868 Link Here
862
866
863
#ifdef HAVE_ICONV
867
#ifdef HAVE_ICONV
864
	      char *orig2,*output2,*output3;
868
	      char *orig2,*output2,*output3;
865
	      int len;
869
	      size_t len;
866
	      orig2=output2=malloc(strlen(string)+1);
870
	      orig2=output2=malloc(strlen(string)+1);
867
	      memset(output2,0,strlen(string)+1);
871
	      memset(output2,0,strlen(string)+1);
868
	      old_output=output;
872
	      old_output=output;
Lines 3110-3116 Link Here
3110
#if HAVE_ICONV
3114
#if HAVE_ICONV
3111
	if (charset){
3115
	if (charset){
3112
	  char *tmpptr;
3116
	  char *tmpptr;
3113
	  int tmplen=0;
3117
	  size_t tmplen=0;
3114
	  tmpptr=subject;
3118
	  tmpptr=subject;
3115
	  subject=i18n_convstring(tmpptr,charset,"UTF-8",&tmplen);
3119
	  subject=i18n_convstring(tmpptr,charset,"UTF-8",&tmplen);
3116
	  if(tmpptr)
3120
	  if(tmpptr)
(-)hypermail-2.2.0.20070131.orig/src/print.c (-2 / +6 lines)
Lines 46-51 Link Here
46
#endif
46
#endif
47
#endif
47
#endif
48
48
49
#ifdef HAVE_STRING_H
50
#include <string.h>
51
#endif
52
49
static char *indextypename[NO_INDEX];
53
static char *indextypename[NO_INDEX];
50
54
51
#ifdef GDBM
55
#ifdef GDBM
Lines 1412-1418 Link Here
1412
  fprintf(fp, "<address class=\"headers\">\n");
1416
  fprintf(fp, "<address class=\"headers\">\n");
1413
1417
1414
#ifdef HAVE_ICONV
1418
#ifdef HAVE_ICONV
1415
  int tmplen;
1419
  size_t tmplen;
1416
  char *tmpsubject=i18n_convstring(email->subject,"UTF-8",email->charset,&tmplen);
1420
  char *tmpsubject=i18n_convstring(email->subject,"UTF-8",email->charset,&tmplen);
1417
  char *tmptmpname=i18n_convstring(email->name,"UTF-8",email->charset,&tmplen); 
1421
  char *tmptmpname=i18n_convstring(email->name,"UTF-8",email->charset,&tmplen); 
1418
  char *tmpname=convchars(tmptmpname,"utf-8");
1422
  char *tmpname=convchars(tmptmpname,"utf-8");
Lines 2040-2046 Link Here
2040
    char *ptr;
2044
    char *ptr;
2041
#ifdef HAVE_ICONV
2045
#ifdef HAVE_ICONV
2042
    char *localsubject=NULL,*localname=NULL;
2046
    char *localsubject=NULL,*localname=NULL;
2043
    int convlen=0;
2047
    size_t convlen=0;
2044
#endif
2048
#endif
2045
2049
2046
2050
(-)hypermail-2.2.0.20070131.orig/src/proto.h (-1 / +1 lines)
Lines 93-99 Link Here
93
/*
93
/*
94
** string.c functions
94
** string.c functions
95
*/
95
*/
96
char *i18n_convstring(char *, char *, char *, int *);
96
char *i18n_convstring(char *, char *, char *, size_t *);
97
char *i18n_utf2numref(char *, int);
97
char *i18n_utf2numref(char *, int);
98
char *i18n_numref2utf(char *);
98
char *i18n_numref2utf(char *);
99
99
(-)hypermail-2.2.0.20070131.orig/src/string.c (-3 / +7 lines)
Lines 28-33 Link Here
28
#include "parse.h"
28
#include "parse.h"
29
#include "uconvert.h"
29
#include "uconvert.h"
30
30
31
#ifdef HAVE_STRING_H
32
#include <string.h>
33
#endif
34
31
/* I18N hack */
35
/* I18N hack */
32
#ifdef HAVE_ICONV_H
36
#ifdef HAVE_ICONV_H
33
#include <iconv.h>
37
#include <iconv.h>
Lines 93-101 Link Here
93
}
97
}
94
98
95
99
96
char *i18n_convstring(char *string, char *fromcharset, char *tocharset, int *len){
100
char *i18n_convstring(char *string, char *fromcharset, char *tocharset, size_t *len){
97
101
98
  int origlen,strleft,bufleft;
102
  size_t origlen,strleft,bufleft;
99
  char *convbuf,*origconvbuf;
103
  char *convbuf,*origconvbuf;
100
  iconv_t iconvfd;
104
  iconv_t iconvfd;
101
  size_t ret;
105
  size_t ret;
Lines 1226-1232 Link Here
1226
  free(newcmd2);
1230
  free(newcmd2);
1227
   
1231
   
1228
  /* put subject */
1232
  /* put subject */
1229
  if (strlen(subject)>0){
1233
  if (subject && strlen(subject)>0){
1230
    newcmd2 = replace(newcmd, "$SUBJECT", convsubj);
1234
    newcmd2 = replace(newcmd, "$SUBJECT", convsubj);
1231
  }else{
1235
  }else{
1232
    newcmd2 = replace(newcmd, "$SUBJECT", "");
1236
    newcmd2 = replace(newcmd, "$SUBJECT", "");

Return to bug 98496