diff --git a/LibRaw-0.16.1.tar.gz b/LibRaw-0.16.1.tar.gz
deleted file mode 100644
index 49bea97..0000000
--- a/LibRaw-0.16.1.tar.gz
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:a1b95b6c2379e46bf09321d3281185474ea47d1e4585f3c5a4f36e0fbcbbe8bc
-size 1479416
diff --git a/LibRaw-0.16.2.tar.gz b/LibRaw-0.16.2.tar.gz
new file mode 100644
index 0000000..47e482b
--- /dev/null
+++ b/LibRaw-0.16.2.tar.gz
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:6344e355f7c23f13e266844b36265d5f624237ba5a62dc901c7b91b510a84187
+size 1476575
diff --git a/libraw.changes b/libraw.changes
index 76edd88..e918847 100644
--- a/libraw.changes
+++ b/libraw.changes
@@ -1,3 +1,9 @@
+-------------------------------------------------------------------
+Sat Jun  6 19:09:45 UTC 2015 - jengelh@inai.de
+
+- Update to new upstream release 0.16.2
+* Fixed several bugs detected by running American Fuzzy Lop.
+
 -------------------------------------------------------------------
 Mon May 11 14:37:27 UTC 2015 - pgajdos@suse.com
 
diff --git a/libraw.spec b/libraw.spec
index 9f0769f..630113a 100644
--- a/libraw.spec
+++ b/libraw.spec
@@ -19,17 +19,16 @@
 %define tar_name LibRaw
 
 Name:           libraw
-%define lnum	10
-Version:        0.16.1
+%define lname	libraw10
+Version:        0.16.2
 Release:        0
 Summary:        Library for reading RAW files obtained from digital photo cameras
 License:        CDDL-1.0 or LGPL-2.1
 Group:          Development/Libraries/C and C++
 Url:            http://www.libraw.org/
 
-#Freecode-URL:	http://freecode.com/projects/libraw
 #Git-Clone:	git://github.com/LibRaw/LibRaw
-Source:         http://www.libraw.org/data/%{tar_name}-%{version}.tar.gz
+Source:         http://www.libraw.org/data/%tar_name-%version.tar.gz
 BuildRequires:  fdupes
 BuildRequires:  gcc-c++
 BuildRequires:  libjasper-devel
@@ -45,46 +44,46 @@ cameras (CRW/CR2, NEF, RAF, DNG, and others).
 LibRaw is based on the source codes of the dcraw utility, where part of
 drawbacks have already been eliminated and part will be fixed in future.
 
-%package        tools
+%package tools
 Summary:        Library for reading RAW files obtained from digital photo cameras -- Tools
-Group:          System/Libraries
+Group:          Productivity/Graphics/Other
 
-%description    tools
+%description tools
 LibRaw is a library for reading RAW files obtained from digital photo
 cameras (CRW/CR2, NEF, RAF, DNG, and others).
 
 LibRaw is based on the source codes of the dcraw utility, where part of
 drawbacks have already been eliminated and part will be fixed in future.
 
-%package        -n libraw%{lnum}
+%package -n %lname
 Summary:        Library for reading RAW files obtained from digital photo cameras
 Group:          System/Libraries
 
-%description    -n libraw%{lnum}
+%description -n %lname
 LibRaw is a library for reading RAW files obtained from digital photo
 cameras (CRW/CR2, NEF, RAF, DNG, and others).
 
 LibRaw is based on the source codes of the dcraw utility, where part of
 drawbacks have already been eliminated and part will be fixed in future.
 
-%package        devel
-Summary:        Development files for %{name}
+%package devel
+Summary:        Development files for libraw
 Group:          Development/Libraries/C and C++
-Requires:       libraw%{lnum} = %{version}
+Requires:       %lname = %version
 
-%description    devel
+%description devel
 LibRaw is a library for reading RAW files obtained from digital photo
 cameras (CRW/CR2, NEF, RAF, DNG, and others).
 
 LibRaw is based on the source codes of the dcraw utility, where part of
 drawbacks have already been eliminated and part will be fixed in future.
 
-%package        devel-static
+%package devel-static
 Summary:        Library for reading RAW files obtained from digital photo cameras
 Group:          Development/Libraries/C and C++
-Requires:       %{name}-devel = %{version}
+Requires:       %name-devel = %version
 
-%description    devel-static
+%description devel-static
 LibRaw is a library for reading RAW files obtained from digital photo
 cameras (CRW/CR2, NEF, RAF, DNG, and others).
 
@@ -95,10 +94,10 @@ This package contains static libraries that applications can use to build
 against LibRaw. LibRaw does not provide dynamic libraries.
 
 %prep
-%setup -q -n %{tar_name}-%{version}
+%setup -qn %tar_name-%version
 
 %build
-CXXFLAGS="%{optflags} -fPIC" \
+export CXXFLAGS="%optflags -fPIC"
 %configure
 # build env is too broken for parallel build
 make %{?_smp_mflags}
@@ -112,44 +111,33 @@ chmod -x manual/index.html
 make install DESTDIR="%buildroot"
 rm -f "%buildroot/%_libdir"/*.la
 # duplicated files
-rm -rf %{buildroot}%{_datadir}/doc
+rm -rf %buildroot%_datadir/doc
 %fdupes %buildroot/%_prefix
 
-%post -n libraw%{lnum} -p /sbin/ldconfig
-
-%postun -n libraw%{lnum} -p /sbin/ldconfig
+%post   -n %lname -p /sbin/ldconfig
+%postun -n %lname -p /sbin/ldconfig
 
 %files tools
-%defattr(-,root,root,-)
-%{_bindir}/4channels
-%{_bindir}/dcraw_emu
-%{_bindir}/dcraw_half
-%{_bindir}/half_mt
-%{_bindir}/mem_image
-%{_bindir}/raw-identify
-%{_bindir}/simple_dcraw
-%{_bindir}/unprocessed_raw
-%{_bindir}/multirender_test
-%{_bindir}/postprocessing_benchmark
+%defattr(-,root,root)
+%_bindir/*
 
 %files devel
-%defattr(-,root,root,-)
+%defattr(-,root,root)
 %doc Changelog.txt COPYRIGHT LICENSE.CDDL LICENSE.LGPL LICENSE.LibRaw.pdf
 %doc manual
-%{_includedir}/%{name}/
-%{_libdir}/pkgconfig/libraw.pc
-%{_libdir}/pkgconfig/libraw_r.pc
-%{_libdir}/libraw.so
-%{_libdir}/libraw_r.so
+%_includedir/%name/
+%_libdir/pkgconfig/*.pc
+%_libdir/libraw.so
+%_libdir/libraw_r.so
 
-%files -n libraw%{lnum}
-%defattr(-,root,root,-)
-%{_libdir}/libraw.so.%{lnum}*
-%{_libdir}/libraw_r.so.%{lnum}*
+%files -n %lname
+%defattr(-,root,root)
+%_libdir/libraw.so.*
+%_libdir/libraw_r.so.*
 
 %files devel-static
-%defattr(-,root,root,-)
-%{_libdir}/libraw.a
-%{_libdir}/libraw_r.a
+%defattr(-,root,root)
+%_libdir/libraw.a
+%_libdir/libraw_r.a
 
 %changelog