This commit is contained in:
mvl%exedo.nl 2005-01-24 22:34:58 +00:00
Родитель 0bb649880a
Коммит 29176d02e4
2 изменённых файлов: 11 добавлений и 11 удалений

Просмотреть файл

@ -3,7 +3,7 @@
FILE: icalparser.c
CREATOR: eric 04 August 1999
$Id: icalparser.c,v 1.1.1.1 2005/01/05 20:09:15 mvl%exedo.nl Exp $
$Id: icalparser.c,v 1.1.1.2 2005/01/24 22:10:58 mvl%exedo.nl Exp $
$Locker: $
The contents of this file are subject to the Mozilla Public License
@ -47,7 +47,7 @@
#include "icalcomponent.h"
#include <string.h> /* For strncpy & size_t */
#include <stdio.h> /* For FILE and fgets and sprintf */
#include <stdio.h> /* For FILE and fgets and snprintf */
#include <stdlib.h> /* for free */
#include "icalmemory.h"
@ -938,7 +938,7 @@ icalcomponent* icalparser_add_line(icalparser* parser,
icalproperty_kind prop_kind = icalproperty_isa(prop);
icalcomponent* tail = pvl_data(pvl_tail(parser->components));
sprintf(temp,"Cant parse as %s value in %s property. Removing entire property",
snprintf(temp,sizeof(temp),"Cant parse as %s value in %s property. Removing entire property",
icalvalue_kind_to_string(value_kind),
icalproperty_kind_to_string(prop_kind));
@ -968,7 +968,7 @@ icalcomponent* icalparser_add_line(icalparser* parser,
icalproperty_kind prop_kind = icalproperty_isa(prop);
icalcomponent *tail = pvl_data(pvl_tail(parser->components));
sprintf(temp,"No value for %s property. Removing entire property",
snprintf(temp,sizeof(temp),"No value for %s property. Removing entire property",
icalproperty_kind_to_string(prop_kind));
insert_error(tail, str, temp,

Просмотреть файл

@ -3,7 +3,7 @@
FILE: icalrecur.c
CREATOR: eric 16 May 2000
$Id: icalrecur.c,v 1.1.1.1 2005/01/05 20:09:16 mvl%exedo.nl Exp $
$Id: icalrecur.c,v 1.1.1.2 2005/01/24 22:10:58 mvl%exedo.nl Exp $
$Locker: $
@ -537,13 +537,13 @@ char* icalrecurrencetype_as_string(struct icalrecurrencetype *recur)
}
if(recur->count != 0){
sprintf(temp,"%d",recur->count);
snprintf(temp,sizeof(temp),"%d",recur->count);
icalmemory_append_string(&str,&str_p,&buf_sz,";COUNT=");
icalmemory_append_string(&str,&str_p,&buf_sz, temp);
}
if(recur->interval != 0){
sprintf(temp,"%d",recur->interval);
snprintf(temp,sizeof(temp),"%d",recur->interval);
icalmemory_append_string(&str,&str_p,&buf_sz,";INTERVAL=");
icalmemory_append_string(&str,&str_p,&buf_sz, temp);
}
@ -570,12 +570,12 @@ char* icalrecurrencetype_as_string(struct icalrecurrencetype *recur)
if (pos == 0)
icalmemory_append_string(&str,&str_p,&buf_sz,daystr);
else {
sprintf(temp,"%d%s",pos,daystr);
snprintf(temp,sizeof(temp),"%d%s",pos,daystr);
icalmemory_append_string(&str,&str_p,&buf_sz,temp);
}
} else {
sprintf(temp,"%d",array[i]);
snprintf(temp,sizeof(temp),"%d",array[i]);
icalmemory_append_string(&str,&str_p,&buf_sz, temp);
}
@ -589,9 +589,9 @@ char* icalrecurrencetype_as_string(struct icalrecurrencetype *recur)
/* If week start is not monday (the default per RFC2445) append WKST */
if (recur->week_start != ICAL_MONDAY_WEEKDAY) {
sprintf(temp,"%s", icalrecur_weekday_to_string(recur->week_start));
icalmemory_append_string(&str,&str_p,&buf_sz,";WKST=");
icalmemory_append_string(&str,&str_p,&buf_sz, temp);
icalmemory_append_string(&str,&str_p,&buf_sz,
icalrecur_weekday_to_string(recur->week_start));
}
return str;