Quantum confinement and magnetic-field effects on the electron g factor in GaAs–(Ga, Al)As cylindrical quantum dots