For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings


Need to speed up your development?
Have a look at our:

Samples & Tools


Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

Bug: BRepFill_Sweep.cxx line 572 (OCCT 6.5.2)

Pawel's picture


since sprintf does not allocate memory the lines:

char* name;

will probably lead to a crash. My fix is to declare name as a fixed-size array instead:

char name[128];


Massimo Del Fedele's picture

what about

char *name = strdup("wire-on-face")

and if needed


? I usually see as dangerous the fixed-size arrays...


mayan's picture

Egal, du kanst deine eigene gepasste OCC-Libs kompilieren

Pawel's picture

Hello Max,

the variable 'name' is still needed when the function exits and I was too lazy to look for the place where it is not needed any more ;)


Pawel's picture

by the way, most of the problems reported today were found by cppcheck.


Thomas Paviot's picture

Hi Pawel,

I confirm. I ran cppcheck-1.52 over the current OCE master branch and it reported some of the issues you reported. I fixed a few of them, created a dev branch on github, and included your fixes (see


Pawel's picture

Contact us

Attention: DO NOT use this form for all kind of request for the removal of your personal data. Please follow this link for such cases.