The opinion of the court was delivered by
Smith, J.:The petitioner was charged by information in the district court of Labette county with the crime, we will assume, of burglary and larceny. The value of the property stolen was alleged to be three dollars.
Upon arraignment the journal entry shows that he pleaded guilty to “felonious” larceny, as charged in the information, and thereupon, upon the motion of the •county attorney, the court ordered that the charge of burglary be, and the same was, dismissed.
Upon this plea the petitioner was sentenced to be confined in the Kansas state industrial reformatory until fully reformed and discharged therefrom as by law provided. This judgment was rendered on February 29, 1904,.and the return shows that the petitioner has ever since been and still is confined in the reformatory pursuant to the judgment. This action is brought by his next friend to secure his release therefrom.
The question whether the information sufficiently *165charged the crime of burglary is immaterial to, and need not be decided in, the determination of this case, as' that charge was dismissed.
The information charged the petitioner with the offense of petit larceny, under the provisions of section 80 of the crimes and punishments act (Gen. Stat. 1901, §2071), but did not charge any offense under section 806 of that act (Gen. Stat. 1901, § 2Ó73). The portion of the information necessary to the determination of this question reads:
“One A, Spaulding and one ——— did then and" there unlawfully,, feloniously, wilfully and burglar-iously break into a'nd enter a certain building, consisting of a St. Louis & San Francisco box ca’r, . . . said building being located and standing on the south side of the east-Y track; .. ... said building being used as a tool and supply house; . . . . and. did then and there unlawfully, feloniously and wilfully take, steal and carry áway the following-described articles of personal property, tó wit': Ohé pair óf men’s shoes of the value of $2, two towels' of the value of.50c, and five handkerchiefs of the value of 10c each, total 50c, all of the total value of $3.” ^
Section 806, previously referred to, reads:
“If any larceny be committed in any railway depot, station-house, telegraph office, passenger-coach, baggage-, express- or freight-car, or any caboose on any railway in this state, the offender may be punished by.confinement and hard labor not exceeding seven years.” (fcen. Stat. Í901, § 2073.)
It seems hardly necessary to say that a box car dismantled, set off the track and used as a tool and supply house is neither such a building nor such a car as is described or contemplated by section 806.
The defendant pleaded guilty to the larceny as charged, which is petit larceny, and the sentence as for a felony is not authorized and is void. We are prohibited by section 5167 of the General Statutes of 1901 from inquiring into the legality of any judgment of a court of competent jurisdiction in a habeas corpus pro*166ceeding for the purpose of correcting mere errors or irregularities which may be appealable. But where a court, having jurisdiction of the person and of the subject-matter, exceeds its power and pronounces a judgment not authorized by law — a void judgment— relief may be granted in a habeas corpus proceeding. (In re McNeil, 68 Kan. 366, 74 Pac. 1110.) In the McNeil case the petitioner had been convicted of a misdemeanor, and the penalty prescribed by statute was a fine or imprisonment; the court imposed both penalties. The petitioner satisfied the judgment as to the fine and this court discharged the defendant from the imprisonment imposed. In the case at bar the petitioner was lawfully convicted of a misdemeanor, and although he has apparently suffered a much greater penalty than the law imposes for the offense of which he was convicted he has not paid the penalty imposed by law. No legal judgment has been pronounced against him, and hence no such judgment could be satisfied. We have no power to substitute his illegal confinement in the reformatory for the penalty prescribed by law. (In re Howard, 72 Kan. 273, 83 Pac. 1032.)
It is the judgment of this court that the sentence is void, and, unless a valid judgment be rendered against him within ten days, the petitioner shall be discharged '■from the custody of the superintendent and board of managers of the Kansas state reformatory at Hutchinson, Kan.