Code:  static inline void VectorClamp(DDSVector4 *value)
 {
  value->x = MinF(1.0f,MaxF(0.0f,value->x));
  value->y = MinF(1.0f,MaxF(0.0f,value->y));
  value->z = MinF(1.0f,MaxF(0.0f,value->z));
  value->w = MinF(1.0f,MaxF(0.0f,value->w));
 }

Commit Message: Added extra EOF check and some minor refactoring.
CWE ID: CWE-20
 static inline void VectorClamp(DDSVector4 *value)
 {
  value->x = MagickMin(1.0f,MagickMax(0.0f,value->x));
  value->y = MagickMin(1.0f,MagickMax(0.0f,value->y));
  value->z = MagickMin(1.0f,MagickMax(0.0f,value->z));
  value->w = MagickMin(1.0f,MagickMax(0.0f,value->w));
 }
