2025-12-04 16:39 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/cdpapi.c
! fixed hb_cdpUTF8StringPeek() to work with 0 based indexes and
Unicode characters > 0xFFFF
* src/rtl/hbmd5.c
! removed redundant code (copy and past typo)
This commit is contained in:
@@ -7,6 +7,14 @@
|
|||||||
Entries may not always be in chronological/commit order.
|
Entries may not always be in chronological/commit order.
|
||||||
See license at the end of file. */
|
See license at the end of file. */
|
||||||
|
|
||||||
|
2025-12-04 16:39 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
||||||
|
* src/rtl/cdpapi.c
|
||||||
|
! fixed hb_cdpUTF8StringPeek() to work with 0 based indexes and
|
||||||
|
Unicode characters > 0xFFFF
|
||||||
|
|
||||||
|
* src/rtl/hbmd5.c
|
||||||
|
! removed redundant code (copy and past typo)
|
||||||
|
|
||||||
2025-11-22 12:40 UTC+0100 Aleksander Czajczynski (hb fki.pl)
|
2025-11-22 12:40 UTC+0100 Aleksander Czajczynski (hb fki.pl)
|
||||||
* include/hbdefs.h
|
* include/hbdefs.h
|
||||||
! fix undefined behaviour on signed int overflow in
|
! fix undefined behaviour on signed int overflow in
|
||||||
|
|||||||
@@ -1505,11 +1505,11 @@ HB_WCHAR32 hb_cdpUTF8StringPeek( const char * pSrc, HB_SIZE nLen, HB_SIZE nPos )
|
|||||||
{
|
{
|
||||||
HB_SIZE nIndex = 0;
|
HB_SIZE nIndex = 0;
|
||||||
|
|
||||||
while( nPos && nIndex < nLen )
|
while( nIndex < nLen )
|
||||||
{
|
{
|
||||||
HB_WCHAR wc;
|
HB_WCHAR32 wc;
|
||||||
hb_cdpUTF8GetU16( pSrc, nLen, &nIndex, &wc );
|
hb_cdpUTF8GetU32( pSrc, nLen, &nIndex, &wc );
|
||||||
if( --nPos == 0 )
|
if( nPos-- == 0 )
|
||||||
return wc;
|
return wc;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -417,14 +417,6 @@ HB_FUNC( HB_MD5 ) /* Considered insecure. Use SHA256 or higher instead. */
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
hb_retclen( dststr, HB_SIZEOFARRAY( dststr ) );
|
hb_retclen( dststr, HB_SIZEOFARRAY( dststr ) );
|
||||||
if( ! hb_parl( 2 ) )
|
|
||||||
{
|
|
||||||
char digest[ ( sizeof( dststr ) * 2 ) + 1 ];
|
|
||||||
hb_strtohex( dststr, sizeof( dststr ), digest );
|
|
||||||
hb_retclen( digest, HB_SIZEOFARRAY( digest ) - 1 );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
hb_retclen( dststr, HB_SIZEOFARRAY( dststr ) );
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
hb_retc_null(); /* return empty string on wrong call */
|
hb_retc_null(); /* return empty string on wrong call */
|
||||||
|
|||||||
Reference in New Issue
Block a user