  We prove a logarithmic stability estimate for the inverse problem of
determining the potential in a wave equation from boundary measurements
obtained by varying the first component of the initial condition. The novelty
of the present work is that no geometric condition is imposed to the
sub-boundary where the measurements are made. Our results improve those
obtained by the first and second authors in [2]. We also show how the analysis
for the wave equation can be adapted to an inverse coefficient problem for the
heat equation
