SHA256
3
0
forked from pool/aaa_base
OBS User unknown 2007-09-06 19:46:10 +00:00 committed by Git OBS Bridge
parent 9d9382d554
commit f70124d411
4 changed files with 56 additions and 8 deletions

View File

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Wed Sep 5 00:39:43 CEST 2007 - maw@suse.de
- Add /usr/share/gnome to XDG_DATA_DIRS (#307213).
-------------------------------------------------------------------
Tue Sep 4 13:35:33 CEST 2007 - bwalle@suse.de
- get_kernel_version: make check more strict to usage on kernel
dumps (#307326)
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Aug 31 14:29:22 CEST 2007 - rguenther@suse.de Fri Aug 31 14:29:22 CEST 2007 - rguenther@suse.de

View File

@ -19,7 +19,7 @@ Requires: aaa_skel filesystem distribution-release logrotate /bin/mktemp /
PreReq: /usr/bin/sed /usr/bin/grep /bin/mv /bin/cat /bin/ls /bin/date /usr/bin/cmp /bin/fillup /sbin/insserv net-tools PreReq: /usr/bin/sed /usr/bin/grep /bin/mv /bin/cat /bin/ls /bin/date /usr/bin/cmp /bin/fillup /sbin/insserv net-tools
Autoreqprov: on Autoreqprov: on
Version: 10.3 Version: 10.3
Release: 77 Release: 79
Summary: SUSE Linux Base Package Summary: SUSE Linux Base Package
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: aaa_base.tar.bz2 Source: aaa_base.tar.bz2
@ -134,6 +134,11 @@ done > aaa_base.files
%defattr(-,root,root) %defattr(-,root,root)
%changelog %changelog
* Wed Sep 05 2007 - maw@suse.de
- Add /usr/share/gnome to XDG_DATA_DIRS (#307213).
* Tue Sep 04 2007 - bwalle@suse.de
- get_kernel_version: make check more strict to usage on kernel
dumps (#307326)
* Fri Aug 31 2007 - rguenther@suse.de * Fri Aug 31 2007 - rguenther@suse.de
- Drop procps BuildRequires again. - Drop procps BuildRequires again.
* Wed Aug 29 2007 - werner@suse.de * Wed Aug 29 2007 - werner@suse.de

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:d6991c64d7749fc8c116240e7d2ab977295685d37b3edac9b410364752d84251 oid sha256:c1be0773d9e851dae32597963ef179bb5734e985b0df59f1616c241b88512fce
size 78487 size 78525

View File

@ -16,11 +16,18 @@
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <ctype.h>
#include <unistd.h> #include <unistd.h>
#include <fcntl.h> #include <fcntl.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/types.h> #include <sys/types.h>
static inline int my_is_alnum_punct(char c)
{
return isdigit(c) || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')
|| c == '.' || c == ',' || c == '-' || c == '_';
}
int int
main (int argc, char *argv[]) main (int argc, char *argv[])
{ {
@ -92,10 +99,33 @@ main (int argc, char *argv[])
buffer[i+8] == 'r' && buffer[i+9] == 's' && buffer[i+8] == 'r' && buffer[i+9] == 's' &&
buffer[i+10] == 'i' && buffer[i+11] == 'o' && buffer[i+10] == 'i' && buffer[i+11] == 'o' &&
buffer[i+12] == 'n' && buffer[i+13] == ' ') buffer[i+12] == 'n' && buffer[i+13] == ' ')
{
int j = i+14;
int invalid_char = 0;
int in_number_range = 1;
/* check if we really found a version */
for (j = j+1; buffer[j] != ' '; j++)
{
char c = buffer[j];
if (c == '-')
in_number_range = 0;
if ((in_number_range && !isdigit(c) && c != '.') ||
(!in_number_range && !my_is_alnum_punct(c)))
{
invalid_char = 1;
break;
}
}
if (!invalid_char)
{ {
found = 1; found = 1;
break; break;
} }
}
if (found) if (found)
{ {
@ -106,7 +136,7 @@ main (int argc, char *argv[])
} }
else else
{ {
if (in < (sizeof (buffer) - MAX_VERSION_LENGTH)) if (in < (ssize_t)(sizeof (buffer) - MAX_VERSION_LENGTH))
break; break;
memcpy (&buffer[0], &buffer[sizeof (buffer) - MAX_VERSION_LENGTH], memcpy (&buffer[0], &buffer[sizeof (buffer) - MAX_VERSION_LENGTH],
MAX_VERSION_LENGTH); MAX_VERSION_LENGTH);
@ -154,3 +184,5 @@ main (int argc, char *argv[])
return 0; return 0;
} }
/* vim: set sw=4 ts=8 sts=4 noet: */