Opinion ID: 1989907
Heading Depth: 3
Heading Rank: 3

Heading: Buffer Overflow Error

Text: During the proceedings on remand, Draeger's expert, Bruce Geller, identified a significant flaw in the program's source code that, in limited circumstances, can lead to an inaccurate reported BAC test result. Following Geller's testimony, Draeger's programmer, Shaffer, disputed many of the conclusions proffered by defendants' experts, but he acknowledged and explained the buffer overflow defect, admitting that he was responsible for the inclusion of this error in the code. The buffer overflow error is only relevant when a test subject, based on the IR and EC results of the first two breath samples that fall outside of the accepted tolerance, is given a third test. [32] Whenever that occurs, there are six results (an IR and EC value for each test) that must be evaluated. According to Shaffer, an array of temporary variables is declared in order to calculate the blood alcohol level from the six readings. The available Alcotest array, as currently programmed, however, is only large enough for four readings, and therefore does not hold the second and third EC values. For purposes of this calculation, the third EC value is stored, accurately, in a previous memory location, but the second EC value is altered because of the buffer overflow error. In a situation in which there are six readings, if the second EC result is the lowest value, the device will effectively overlook it and the calculated BAC level will be incorrectly reported instead as the next lowest of the six readings. Shaffer testified that although the buffer overflow error must be corrected, [33] the previously recorded AIRs correctly display the values for each of the six readings. According to Shaffer, the only error on the AIR will be its report of the BAC. Whether the buffer overflow error affected the reported result, however, is not immediately obvious from looking at the AIR. Instead, a set of calculations, referred to by all of the parties as the Shaffer formula, must be employed to determine whether the buffer overflow error occurred, and, if so, what the proper BAC should have been. The Special Master, finding Shaffer's candor to be impressive and his testimony completely reliable, concluded that the buffer overflow error is a real one that must be corrected. Pending any corrective action, he recommended that the use of all AIRs that report three breath samples either be prohibited as a basis for prosecution or, in the alternative, that Shaffer's corrective formula be applied. Defendants argue that the Special Master's solution is inadequate because of the effect of the widened tolerance which led to fewer third tests, but they do not otherwise suggest that either of his proposed alternatives is inappropriate for AIRs reporting third test results. The State, although conceding that the error is one that must be corrected, argues that there is no basis on which to discard previously reported results in light of the ability of the courts to apply the corrective formula to the reported results. There is no doubt in the record that the Firmware version 3.11 source code includes an error, which may cause the BAC to be incorrectly reported in cases when a third breath sample has been taken. [34] The record, however, makes clear that the error does not in any way alter the accuracy of the reported results for each test of each breath sample, but instead lies in the manner in which the device reads and evaluates that data to calculate the lowest BAC, which then may be both inaccurately calculated and reported. Were we without confidence in the accuracy of the individually reported results, we would be constrained to agree with the Special Master's suggestion that we reject all of the tests in which a third sample was taken. However, in light of the fact that there is no evidence in the record on which to conclude that the six readings will themselves be inaccurate, we find no ground on which to order a resolution so drastic. Instead, we conclude that each AIR that includes three breath tests will be admissible as evidence of an accurate BAC reading only after application of the Shaffer formula [35] to ensure the correct calculation of the lowest possible result and reading. We do so, however, with two added cautions heretofore unspoken. First, a third sample is taken only when the four readings from the first two samples are outside of the accepted range of tolerance. As a result, where there are three breath samples, the device does not simply identify and report the lowest of the six reported readings. Instead, it must first evaluate the six readings to determine which of the samples fall within the accepted tolerance and then determine, through truncation, which is the lowest acceptable reported result. Calculating the correct result in the face of the buffer overflow error is therefore not a matter of visually inspecting the reported results and selecting the lowest of them. Rather, the use of the formula is required to ensure that the apparently lowest result is also the lowest acceptable one in accordance with the tolerance range. [36] Second, we note that in devising the formula, Shaffer continued to utilize the tolerance calculation reflecting the doubled range. Because we have rejected that range as unacceptable, we have revised the formula, in the form of a worksheet, and have appended it to the Order that accompanies this opinion in its corrected format. The use of this methodology, however, will require that, pending appropriate correction to the firmware, each AIR with three test sample results must be separately reviewed and that calculations must be performed and verified for accuracy in accordance with Shaffer's formula. [37] We therefore direct that the State undertake to review all such AIRs, perform the calculations to identify the correct BAC in accordance with the Shaffer formula as we have adopted it, and provide that data to the court in which each matter is pending. We further direct that the calculations be made a part of the evidence in any prosecution, pending correction of the firmware, to facilitate appellate review.