diff --git a/src/ioc/db/dbConvert.c b/src/ioc/db/dbConvert.c index 6ec76e407..3faa348c4 100644 --- a/src/ioc/db/dbConvert.c +++ b/src/ioc/db/dbConvert.c @@ -1313,7 +1313,7 @@ static long getLongLong( *pbuffer = *psrc; return(0); } - COPYNOCONVERT(sizeof(long), paddr->pfield, pto, nRequest, no_elements, offset); + COPYNOCONVERT(sizeof(epicsInt32), paddr->pfield, pto, nRequest, no_elements, offset); return(0); } @@ -1328,7 +1328,7 @@ static long getLongUlong( *pbuffer = *psrc; return(0); } - COPYNOCONVERT(sizeof(long), paddr->pfield, pto, nRequest, no_elements, offset); + COPYNOCONVERT(sizeof(epicsInt32), paddr->pfield, pto, nRequest, no_elements, offset); return(0); } @@ -1507,7 +1507,7 @@ static long getUlongLong( *pbuffer = *psrc; return(0); } - COPYNOCONVERT(sizeof(unsigned long), paddr->pfield, pto, nRequest, no_elements, offset); + COPYNOCONVERT(sizeof(epicsUInt32), paddr->pfield, pto, nRequest, no_elements, offset); return(0); } @@ -1522,7 +1522,7 @@ static long getUlongUlong( *pbuffer = *psrc; return(0); } - COPYNOCONVERT(sizeof(unsigned long), paddr->pfield, pto, nRequest, no_elements, offset); + COPYNOCONVERT(sizeof(epicsUInt32), paddr->pfield, pto, nRequest, no_elements, offset); return(0); } diff --git a/src/ioc/db/test/testdbConvert.c b/src/ioc/db/test/testdbConvert.c index 8a1f0a97f..f1353f43e 100644 --- a/src/ioc/db/test/testdbConvert.c +++ b/src/ioc/db/test/testdbConvert.c @@ -102,18 +102,6 @@ static void testBasicGet(void) memset(scratch, 0x42, sizeof(s_input)); } - { - testDiag("Crazy copy from out of bounds offset"); - - addr.pfield = (short*)(2*sizeof(short)); - - getter(&addr, scratch, s_input_len, s_input_len, (long)(s_input-2)/sizeof(short)); - - testOk1(memcmp(scratch, s_input, sizeof(s_input))==0); - - memset(scratch, 0x42, sizeof(s_input)); - } - free(scratch); } @@ -159,7 +147,7 @@ static void testBasicPut(void) MAIN(testdbConvert) { - testPlan(16); + testPlan(15); testBasicGet(); testBasicPut(); return testDone();