http://www.enfacto.com/case/U.S./463/1032/
2. The protective search of the passenger compartment of respondent's car was reasonable under the principles articulated in Terry and other decisions of this Court. Although Terry involved the stop and subsequent patdown search for weapons of a person suspected of criminal activity, it did not restrict the preventive search to the person of the detained suspect. Protection of police and others can justify protective searches when police have a reasonable belief that the suspect poses a danger. Roadside encounters between police and suspects are especially hazardous, and danger may arise from the possible presence of weapons in the area surrounding a suspect. Thus, the search of the passenger compartment of an automobile, limited to those areas in which a weapon may be placed or hidden, is permissible if the police officer possesses a reasonable belief based on specific and articulable facts which, taken together with the rational inferences from those facts, reasonably warrant the officer to believe that the suspect is dangerous and the suspect may gain immediate control of weapons. If, while conducting a legitimate Terry search of an automobile's interior, the officer discovers contraband other than weapons, he cannot be required to ignore the contraband, and the Fourth Amendment does not require its suppression in such circumstances. The circumstances of this case justified the officers in their reasonable belief that respondent posed a danger if he were permitted to reenter his vehicle. Nor did they act unreasonably in taking preventive measures to ensure that there were no other weapons within respondent's immediate grasp before permitting him to reenter his automobile. The fact that respondent was under the officers' control during the investigative stop does not render unreasonable their belief that he could injury them. Pp. 1045-105
Terry v ohio is the basis for the frisk of a person which is why I linked to it, and Michigan v Long extended the frisk to vehicles.
reasonable suspicion is the basis for traffic stops at a minimum and the officer has to be able to articulate his reason for conducting the frisk. i'm not speaking to the o.p's situation, only that i think that what could be construed as a search could have been a terry frisk, the difference being the scope of what is done. for example, if you have reasonable suspicion that there may be a gun in the vehicle, it would not be reasonable to frisk the ashtray, as it would be too small to conceal a gun. was a terry frisk, or a search, justified in this case?? as i said before, don't know, wasn't there, and not going to speculate.