I assume you ask this because you want to figure out of a consumer router running standard firmware is better or openWRT can guarantee you safety.
I think the future will proof the safety is 0% in reality.
There is no safety at all. History has proven us, that backdoors, mistakes in programming, etc. were always discovered after the product was released.
Be that the KRACK hack, or intel chips with Meltdown, or whatever. History has proven us nothing is 100%. There will always be ways where your safety CAN be compromised and thus 0% safety.
The real question is IF and WHEN an open door is found and thus can be misused, how fast can you close the gap?
Most hacks and open doors when they are discovered find their way among those that are specialized in this field very fast. But how fast companies are in implementing fixes, either temporarily of permanent fixes, is usually something you can ignore and many companies on older hardware don't even publish firmware updates.
Golem.de had a nice article about this a few weeks ago that most hardware manufacturers actually are extremely slow in closing gaps, if at all!
I found in the time I'm using LEDE-openWRT that once errors have been found, they fix them within hours! You just recompile your own firmware with latest submissions and case closed.
Thus using openWRT and keep your firmware up to date when news hits the public about backdoors, etc there is a very small time-frame where hackers actually can abuse the available info to hack your router.
The experience I made with openWRT how they close gaps in the security within hours while I'm waiting on hardware manufacturers for months or even indefinitely before they bring out firmware with fixes made me to believe I only buy routers which support openWRT and first thing I do on every router is install latest firmware from openWRT.
I think if you keep your openWRT up-to-date that's the best course of action, but again, if you wanna know what to do to get 100% safety, I advise to forget about it as I personally think that will never happen.