|
From: <il...@us...> - 2003-11-25 07:47:43
|
Update of /cvsroot/meshdb/src/vpf/libvpf
In directory sc8-pr-cvs1:/tmp/cvs-serv31971/libvpf
Modified Files:
vpf_si.c
Log Message:
Fixed a case where a pointer-to-int was being passed as a pointer-to-size_t (which would be a disaster if int and size_t didn't happen to be the same size).
Index: vpf_si.c
===================================================================
RCS file: /cvsroot/meshdb/src/vpf/libvpf/vpf_si.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- vpf_si.c 25 Nov 2003 06:44:48 -0000 1.2
+++ vpf_si.c 25 Nov 2003 06:57:05 -0000 1.3
@@ -33,6 +33,7 @@
{
struct vpfsi *si;
struct spatialhdr *h;
+ size_t baselen;
for (si = v->si_head; si; si = si->next)
if (strcmp(si->name, name) == 0)
@@ -44,11 +45,12 @@
return NULL;
}
if (!vpf_mapfile(v, name, (void **)&si->base,
- &si->baselen)) {
+ &baselen)) {
free(si);
return NULL;
}
strcpy(si->name, name);
+ si->baselen = baselen;
si->endian = v->last_endian;
h = (struct spatialhdr *)si->base;
|