- Update to 0.40.

- Add patch from upstream to fix crash in icalvalue.c.
This commit is contained in:
Kevin Kofler 2008-10-28 05:07:56 +00:00
parent 6dd72f8b0a
commit 1cedd9fd6a
4 changed files with 92 additions and 3 deletions

View File

@ -1 +1 @@
libical-0.32.tar.gz
libical-0.40.tar.gz

View File

@ -0,0 +1,81 @@
--- trunk/libical/src/libical/icalvalue.c 2008/10/27 16:19:27 890
+++ trunk/libical/src/libical/icalvalue.c 2008/10/27 23:20:34 891
@@ -948,24 +948,29 @@
void print_time_to_string(char* str, const struct icaltimetype *data)
{
char temp[20];
+ str[0] = '\0';
- if (icaltime_is_utc(*data)){
- snprintf(temp,sizeof(temp),"%02d%02d%02dZ",data->hour,data->minute,data->second);
- } else {
- snprintf(temp,sizeof(temp),"%02d%02d%02d",data->hour,data->minute,data->second);
- }
-
- strcat(str,temp);
+ if (data != 0) {
+ if (icaltime_is_utc(*data)){
+ snprintf(temp,sizeof(temp),"%02d%02d%02dZ",data->hour,data->minute,data->second);
+ strncat(str,temp,7);
+ } else {
+ snprintf(temp,sizeof(temp),"%02d%02d%02d",data->hour,data->minute,data->second);
+ strncat(str,temp,6);
+ }
+ }
}
void print_date_to_string(char* str, const struct icaltimetype *data)
{
char temp[20];
+ str[0] = '\0';
- snprintf(temp,sizeof(temp),"%04d%02d%02d",data->year,data->month,data->day);
-
- strcat(str,temp);
+ if (data != 0) {
+ snprintf(temp,sizeof(temp),"%04d%02d%02d",data->year,data->month,data->day);
+ strncat(str,temp,8);
+ }
}
static char* icalvalue_date_as_ical_string_r(const icalvalue* value) {
@@ -977,7 +982,7 @@
str = (char*)icalmemory_new_buffer(9);
- str[0] = 0;
+ str[0] = '\0';
print_date_to_string(str,&data);
return str;
@@ -985,10 +990,17 @@
void print_datetime_to_string(char* str, const struct icaltimetype *data)
{
- print_date_to_string(str,data);
- if ( !data->is_date ) {
- strcat(str,"T");
- print_time_to_string(str,data);
+ char temp[20];
+ str[0] = '\0';
+
+ if (data != 0) {
+ print_date_to_string(str,data);
+ if ( !data->is_date ) {
+ strncat(str,"T",19);
+ temp[0] = '\0';
+ print_time_to_string(temp,data);
+ strncat(str,temp,19);
+ }
}
}
@@ -1013,7 +1025,6 @@
str = (char*)icalmemory_new_buffer(20);
str[0] = 0;
-
print_datetime_to_string(str,&data);
return str;

View File

@ -1,5 +1,5 @@
Name: libical
Version: 0.32
Version: 0.40
Release: 1%{?dist}
Summary: Reference implementation of the iCalendar data type and serialization format
Summary(pl): Implementacja formatu iCalendar
@ -10,6 +10,9 @@ URL: http://freeassociation.sourceforge.net/
Source0: http://downloads.sourceforge.net/freeassociation/%{name}-%{version}.tar.gz
Patch0: %{name}-%{version}-makefile.patch
# patch from upstream to fix crash in icalvalue.c:
# http://freeassociation.svn.sourceforge.net/viewvc/freeassociation?view=rev&revision=891
Patch1: libical-0.40-icalvalue-crash.patch
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
@ -42,6 +45,7 @@ korzystających z libical.
%prep
%setup -q
%patch0 -p1
%patch1 -p2
%build
%configure --disable-static -enable-cxx --enable-reentrant
@ -110,6 +114,10 @@ rm -rf $RPM_BUILD_ROOT
%{_includedir}/libicalvcal/vobject.h
%changelog
* Tue Oct 28 2008 Kevin Kofler <Kevin@tigcc.ticalc.org> - 0.40-1
- Update to 0.40.
- Add patch from upstream to fix crash in icalvalue.c.
* Tue Sep 03 2008 Debarshi Ray <rishi@fedoraproject.org> - 0.32-1
- Version bump to 0.32.
- Parallel build problems fixed.

View File

@ -1 +1 @@
7e38be0c75769e62b7f76c5b6f373db9 libical-0.32.tar.gz
bbf9579135ce9b0be2979d104a8dc2fe libical-0.40.tar.gz