mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
9b5f0c2c08 |
@@ -223,14 +223,14 @@ Standard_Boolean BinLDrivers_DocumentSection::ReadTOC (
|
|||||||
char aBuf[THE_BUF_SIZE];
|
char aBuf[THE_BUF_SIZE];
|
||||||
Standard_Integer aNameBufferSize;
|
Standard_Integer aNameBufferSize;
|
||||||
theStream.read ((char *)&aNameBufferSize, sizeof(Standard_Integer));
|
theStream.read ((char *)&aNameBufferSize, sizeof(Standard_Integer));
|
||||||
if (theStream.eof() || aNameBufferSize > THE_BUF_SIZE)
|
if (theStream.eof() || aNameBufferSize > THE_BUF_SIZE - 1)
|
||||||
return Standard_False;
|
return Standard_False;
|
||||||
#ifdef DO_INVERSE
|
#ifdef DO_INVERSE
|
||||||
aNameBufferSize = InverseSize(aNameBufferSize);
|
aNameBufferSize = InverseSize(aNameBufferSize);
|
||||||
#endif
|
#endif
|
||||||
if (aNameBufferSize > 0) {
|
if (aNameBufferSize > 0) {
|
||||||
theStream.read ((char *)&aBuf[0], (Standard_Size)aNameBufferSize);
|
theStream.read ((char *)&aBuf[0], (Standard_Size)aNameBufferSize);
|
||||||
aBuf[aNameBufferSize] = '\0';
|
aBuf[aNameBufferSize-1] = '\0';
|
||||||
theSection.myName = (Standard_CString)&aBuf[0];
|
theSection.myName = (Standard_CString)&aBuf[0];
|
||||||
|
|
||||||
uint64_t aValue[3];
|
uint64_t aValue[3];
|
||||||
|
@@ -1731,8 +1731,10 @@ static void yy_load_buffer_state (void)
|
|||||||
void yy_delete_buffer (YY_BUFFER_STATE b )
|
void yy_delete_buffer (YY_BUFFER_STATE b )
|
||||||
{
|
{
|
||||||
|
|
||||||
if ( ! b )
|
if ( ! b ) {
|
||||||
return;
|
YY_FATAL_ERROR("out of dynamic memory in yy_delete_buffer()");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
|
if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
|
||||||
YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
|
YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
|
||||||
@@ -1750,6 +1752,11 @@ static void yy_load_buffer_state (void)
|
|||||||
static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
|
static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
|
||||||
|
|
||||||
{
|
{
|
||||||
|
if ( ! b ) {
|
||||||
|
YY_FATAL_ERROR("out of dynamic memory in yy_init_buffer()");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
int oerrno = errno;
|
int oerrno = errno;
|
||||||
|
|
||||||
yy_flush_buffer( b );
|
yy_flush_buffer( b );
|
||||||
@@ -1777,8 +1784,10 @@ static void yy_load_buffer_state (void)
|
|||||||
*/
|
*/
|
||||||
void yy_flush_buffer (YY_BUFFER_STATE b )
|
void yy_flush_buffer (YY_BUFFER_STATE b )
|
||||||
{
|
{
|
||||||
if ( ! b )
|
if ( ! b ) {
|
||||||
return;
|
YY_FATAL_ERROR("out of dynamic memory in yy_flush_buffer()");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
b->yy_n_chars = 0;
|
b->yy_n_chars = 0;
|
||||||
|
|
||||||
|
@@ -113,11 +113,11 @@ IFSelect_SessionPilot::IFSelect_SessionPilot (const Standard_CString prompt)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (nc == 0) thewordeb.SetValue (thenbwords,i);
|
if (nc == 0) thewordeb.SetValue (thenbwords,i);
|
||||||
if (nc > MAXCARS) { std::cout<<"Arg."<<thenbwords<<" > "<<MAXCARS<<" car.s, tronque"<<std::endl; continue; }
|
if (nc >= MAXCARS - 1) { std::cout<<"Arg."<<thenbwords<<" > "<<MAXCARS<<" car.s, tronque"<<std::endl; continue; }
|
||||||
unarg[nc] = val; nc ++;
|
unarg[nc] = val; nc ++;
|
||||||
}
|
}
|
||||||
if (nc > 0) {
|
if (nc > 0) {
|
||||||
unarg[nc] = '\0'; thewords(thenbwords).Clear();
|
unarg[nc + 1] = '\0'; thewords(thenbwords).Clear();
|
||||||
thewords(thenbwords).AssignCat(unarg);
|
thewords(thenbwords).AssignCat(unarg);
|
||||||
#ifdef DEBUG_TRACE
|
#ifdef DEBUG_TRACE
|
||||||
std::cout<<"thewords("<<thenbwords<<")="<<unarg<<std::endl<<" .. Fin avec thenbwords="<<thenbwords+1<<std::endl;
|
std::cout<<"thewords("<<thenbwords<<")="<<unarg<<std::endl<<" .. Fin avec thenbwords="<<thenbwords+1<<std::endl;
|
||||||
|
@@ -141,7 +141,7 @@ Returns : iMeter if OK, -1 if no such meter
|
|||||||
======================================================================*/
|
======================================================================*/
|
||||||
int perf_start_imeter (const int iMeter)
|
int perf_start_imeter (const int iMeter)
|
||||||
{
|
{
|
||||||
if (iMeter >= 0 && iMeter < nb_meters) {
|
if (iMeter >= 0 && iMeter < nb_meters && iMeter < MAX_METERS) {
|
||||||
PICK_TIME (MeterTable[iMeter].start_time)
|
PICK_TIME (MeterTable[iMeter].start_time)
|
||||||
return iMeter;
|
return iMeter;
|
||||||
}
|
}
|
||||||
|
@@ -1774,6 +1774,9 @@ void yyFlexLexer::yyrestart( std::istream* input_file )
|
|||||||
void yyFlexLexer::yy_init_buffer( YY_BUFFER_STATE b, std::istream& file )
|
void yyFlexLexer::yy_init_buffer( YY_BUFFER_STATE b, std::istream& file )
|
||||||
|
|
||||||
{
|
{
|
||||||
|
if ( ! b )
|
||||||
|
return;
|
||||||
|
|
||||||
int oerrno = errno;
|
int oerrno = errno;
|
||||||
|
|
||||||
yy_flush_buffer( b );
|
yy_flush_buffer( b );
|
||||||
|
Reference in New Issue
Block a user