You say you are using quadprog with fmincon. But in fact, you are apparently not using quadprog then, but fmincon. I suppose you may be solving a quadratic problem using fmincon. Or, possibly what you meant is you tried both solvers and got the same behavior.
What you need to understand is that when you solve mathematical problems in floating point arithmetic, that you can sometimes get tiny errors that are on the order of the least significant bits (LSB) of your process. In fact, you need to accept that you WILL get that crap in the LSBs. Just a fact of life in a floating point universe. That is no different from the classicly misunderstood problem in floating point that
0.1 + 0.2 ~= 0.3
Next, you need to appreciate that linear systems of equations (thus things like equality constraints and inequalities) will often amplify any noise in the LSBs. Again, this is simply a fact of life.
So ANY noise in those LSBs can be amplified by a factor that MAY be as large as the condition number of the equations involved. That is simply something unavoidable. So even if fmincon (or quadprog) thinks the result is inside the constraints OR on the boundary thereof, a computed point may fall outside by a tiny amount, because numerically locating that constraint is impossible to any more precision in floating point arithmetic using doubles.