Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 73943 | Differences between
and this patch

Collapse All | Expand All

(-)branches/SAMBA_3_0/source/lib/util.c (-9 / +3 lines)
Lines 867-875 Link Here
867
void *malloc_(size_t size)
867
void *malloc_(size_t size)
868
{
868
{
869
#undef malloc
869
#undef malloc
870
	/* If we don't add an amount here the glibc memset seems to write
870
	return malloc(size);
871
	   one byte over. */
872
	return malloc(size+16);
873
#define malloc(s) __ERROR_DONT_USE_MALLOC_DIRECTLY
871
#define malloc(s) __ERROR_DONT_USE_MALLOC_DIRECTLY
874
}
872
}
875
873
Lines 880-888 Link Here
880
static void *calloc_(size_t count, size_t size)
878
static void *calloc_(size_t count, size_t size)
881
{
879
{
882
#undef calloc
880
#undef calloc
883
	/* If we don't add an amount here the glibc memset seems to write
881
	return calloc(count, size);
884
	   one byte over. */
885
	return calloc(count+1, size);
886
#define calloc(n,s) __ERROR_DONT_USE_CALLOC_DIRECTLY
882
#define calloc(n,s) __ERROR_DONT_USE_CALLOC_DIRECTLY
887
}
883
}
888
884
Lines 893-901 Link Here
893
static void *realloc_(void *ptr, size_t size)
889
static void *realloc_(void *ptr, size_t size)
894
{
890
{
895
#undef realloc
891
#undef realloc
896
	/* If we don't add an amount here the glibc memset seems to write
892
	return realloc(ptr, size);
897
	   one byte over. */
898
	return realloc(ptr, size+16);
899
#define realloc(p,s) __ERROR_DONT_USE_RELLOC_DIRECTLY
893
#define realloc(p,s) __ERROR_DONT_USE_RELLOC_DIRECTLY
900
}
894
}
901
895
(-)branches/SAMBA_3_0/source/lib/bitmap.c (-3 / +3 lines)
Lines 41-47 Link Here
41
		return NULL;
41
		return NULL;
42
	}
42
	}
43
43
44
	memset(bm->b, 0, sizeof(bm->b[0])*(n+31)/32);
44
	memset(bm->b, 0, sizeof(uint32)*((n+31)/32));
45
45
46
	return bm;
46
	return bm;
47
}
47
}
Lines 78-84 Link Here
78
		return NULL;
78
		return NULL;
79
	}
79
	}
80
80
81
	memset(bm->b, 0, sizeof(bm->b[0])*(n+31)/32);
81
	memset(bm->b, 0, sizeof(uint32)*((n+31)/32));
82
82
83
	return bm;
83
	return bm;
84
}
84
}
Lines 92-98 Link Here
92
        int count = MIN(dst->n, src->n);
92
        int count = MIN(dst->n, src->n);
93
93
94
        SMB_ASSERT(dst->b != src->b);
94
        SMB_ASSERT(dst->b != src->b);
95
	memcpy(dst->b, src->b, sizeof(dst->b[0])*(count+31)/32);
95
	memcpy(dst->b, src->b, sizeof(uint32)*((count+31)/32));
96
96
97
        return count;
97
        return count;
98
}
98
}

Return to bug 73943