NEW YORK — A federal appeals court warned Tuesday that authorities may have gone too far in their search of an ex-convict's computer, saying the Fourth Amendment protection against unreasonable searches and seizures is irrelevant if every hard drive search is a green light to look at millions of files unrelated to a suspected crime.

The 2nd U.S. Circuit Court of Appeals in Manhattan made the statement as it cast doubt on the legality of the investigation carried out against James R. Galpin Jr., a man serving nearly 48 years in prison in a child pornography case.

Galpin, 52, of Owego, N.Y., was sentenced Nov. 1, 2011 after he pleaded guilty to several counts of production of child pornography, committing a felony offense involving a minor while being required to register as a sex offender and possession of child pornography. Prior to his guilty plea, he moved to suppress all of the evidence, including images of child pornography found on his computer, digital cameras and digital storage devices.

A federal judge in Albany, N.Y., had agreed that the warrant used to gather evidence was overbroad and lacked probable cause to conduct a search for child pornography but ruled that the gathered evidence, which include child pornography, could be used against Galpin anyway because it was in "plain view" for investigators to find.

A three-judge panel of the 2nd Circuit said that explanation might not suffice and ordered the judge to take a second look at it.

"The potential for privacy violations occasioned by an unbridled, exploratory search of a hard drive is enormous," the appeals court said in a decision written by U.S. District Judge Laura Taylor Swain, who was sitting temporarily on the appeals court.

"As numerous courts and commentators have observed, advances in technology and the centrality of computers in the lives of average people have rendered the computer hard drive akin to a residence in terms of the scope and quantity of private information it may contain," she added.

Yet, the appeals court said, a house search has limitations because investigators cannot properly search for a stolen flat-screen television by rummaging through a medicine cabinet or search for false tax documents by viewing the suspect's home video collection.

"Such limitations are largely absent in the digital realm, where the size or other outwardly visible characteristics of a file may disclose nothing about its content," Swain wrote. "Once the government has obtained authorization to search the hard drive, the government may claim that the contents of every file it chose to open were in plain view and, therefore, admissible even if they implicate the defendant in a crime not contemplated by the warrant."

Galpin was convicted in New York in 1991 of first-degree sexual abuse after he abused 22 boys between the ages of 10 and 15. In June 2009, an investigation was initiated against him several years after his release from custody when parents reported he had contacted their children.

A prosecutor did not immediately respond to a request for comment Tuesday.

James F. Greenwald, a public defender in Syracuse, said the search amounted to a "fishing expedition."