Commerce quantity limit
Although that limit appears sane to me, to adjust the maxlength, look at

commerce_line_item_field_widget_form

  $element['line_items'][$line_item_id]['quantity'] = array(
    '#type' =&gt; 'textfield', 
    '#datatype' =&gt; 'integer', 
    '#default_value' =&gt; $quantity, 
    '#size' =&gt; 4, 
    '#maxlength' =&gt; max(4, strlen($quantity)),
  );


You could use hook_field_widget_form_alter and adjust the #maxlength property there.