@@ -0,0 +1,53 @@
+--- busybox-1.12.0/editors/awk.c Wed Aug 6 00:56:11 2008
++++ busybox-1.12.0-awk/editors/awk.c Fri Aug 29 01:17:05 2008
+@@ -973,7 +973,12 @@
+
+ } else if (*p == '.' || isdigit(*p)) {
+ /* it's a number */
+- t_double = strtod(p, &p);
++#if ENABLE_DESKTOP
++ if (p[0] == '0' && (p[1] | 0x20) == 'x')
++ t_double = strtoll(p, &p, 0);
++ else
++#endif
++ t_double = strtod(p, &p);
+ if (*p == '.')
+ syntax_error(EMSG_UNEXP_TOKEN);
+ tc = TC_NUMBER;
+@@ -2034,28 +2039,30 @@
+ setvar_p(res, s);
+ break;
+
++ /* Bitwise ops must assume that operands are unsigned. GNU Awk 3.1.5:
++ * awk '{ print or(-1,1) }' gives "4.29497e+09", not "-2.xxxe+09" */
+ case B_an:
+- setvar_i(res, (long)getvar_i(av[0]) & (long)getvar_i(av[1]));
++ setvar_i(res, (unsigned long)getvar_i(av[0]) & (unsigned long)getvar_i(av[1]));
+ break;
+
+ case B_co:
+- setvar_i(res, ~(long)getvar_i(av[0]));
++ setvar_i(res, ~(unsigned long)getvar_i(av[0]));
+ break;
+
+ case B_ls:
+- setvar_i(res, (long)getvar_i(av[0]) << (long)getvar_i(av[1]));
++ setvar_i(res, (unsigned long)getvar_i(av[0]) << (unsigned long)getvar_i(av[1]));
+ break;
+
+ case B_or:
+- setvar_i(res, (long)getvar_i(av[0]) | (long)getvar_i(av[1]));
++ setvar_i(res, (unsigned long)getvar_i(av[0]) | (unsigned long)getvar_i(av[1]));
+ break;
+
+ case B_rs:
+- setvar_i(res, (long)((unsigned long)getvar_i(av[0]) >> (unsigned long)getvar_i(av[1])));
++ setvar_i(res, (unsigned long)getvar_i(av[0]) >> (unsigned long)getvar_i(av[1]));
+ break;
+
+ case B_xo:
+- setvar_i(res, (long)getvar_i(av[0]) ^ (long)getvar_i(av[1]));
++ setvar_i(res, (unsigned long)getvar_i(av[0]) ^ (unsigned long)getvar_i(av[1]));
+ break;
+
+ case B_lo:
|
@@ -0,0 +1,333 @@
+--- busybox-1.12.0/modutils/insmod.c Wed Aug 6 00:56:02 2008
++++ busybox-1.12.0-insmod/modutils/insmod.c Sun Aug 31 23:56:28 2008
+@@ -1059,8 +1059,9 @@
+
+ case R_68K_PC8:
+ v -= dot;
+- if ((ElfW(Sword))v > 0x7f ||
+- (ElfW(Sword))v < -(ElfW(Sword))0x80) {
++ if ((ElfW(Sword))v > 0x7f
++ || (ElfW(Sword))v < -(ElfW(Sword))0x80
++ ) {
+ ret = obj_reloc_overflow;
+ }
+ *(char *)loc = v;
+@@ -1068,8 +1069,9 @@
+
+ case R_68K_PC16:
+ v -= dot;
+- if ((ElfW(Sword))v > 0x7fff ||
+- (ElfW(Sword))v < -(ElfW(Sword))0x8000) {
++ if ((ElfW(Sword))v > 0x7fff
++ || (ElfW(Sword))v < -(ElfW(Sword))0x8000
++ ) {
+ ret = obj_reloc_overflow;
+ }
+ *(short *)loc = v;
+@@ -1208,8 +1210,9 @@
+ {
+ Elf32_Addr word;
+
+- if ((Elf32_Sword)v > 0x7fff ||
+- (Elf32_Sword)v < -(Elf32_Sword)0x8000) {
++ if ((Elf32_Sword)v > 0x7fff
++ || (Elf32_Sword)v < -(Elf32_Sword)0x8000
++ ) {
+ ret = obj_reloc_overflow;
+ }
+
+@@ -1238,8 +1241,9 @@
+ Elf32_Addr word;
+
+ v -= dot + 4;
+- if ((Elf32_Sword)v > 0x7fff ||
+- (Elf32_Sword)v < -(Elf32_Sword)0x8000) {
++ if ((Elf32_Sword)v > 0x7fff
++ || (Elf32_Sword)v < -(Elf32_Sword)0x8000
++ ) {
+ ret = obj_reloc_overflow;
+ }
+
+@@ -1253,9 +1257,10 @@
+ Elf32_Addr word, gp;
+ /* get _gp */
+ gp = obj_symbol_final_value(f, obj_find_symbol(f, SPFX "_gp"));
+- v-=gp;
+- if ((Elf32_Sword)v > 0x7fff ||
+- (Elf32_Sword)v < -(Elf32_Sword)0x8000) {
++ v -= gp;
++ if ((Elf32_Sword)v > 0x7fff
++ || (Elf32_Sword)v < -(Elf32_Sword)0x8000
++ ) {
+ ret = obj_reloc_overflow;
+ }
+
+@@ -2132,7 +2137,6 @@
+ for (sym = f->symtab[hash]; sym; sym = sym->next)
+ if (f->symbol_cmp(sym->name, name) == 0)
+ return sym;
+-
+ return NULL;
+ }
+
+@@ -2141,12 +2145,10 @@
+ if (sym) {
+ if (sym->secidx >= SHN_LORESERVE)
+ return sym->value;
+-
+ return sym->value + f->sections[sym->secidx]->header.sh_addr;
+- } else {
+- /* As a special case, a NULL sym has value zero. */
+- return 0;
+ }
++ /* As a special case, a NULL sym has value zero. */
++ return 0;
+ }
+
+ static struct obj_section *obj_find_section(struct obj_file *f, const char *name)
+@@ -2156,7 +2158,6 @@
+ for (i = 0; i < n; ++i)
+ if (strcmp(f->sections[i]->name, name) == 0)
+ return f->sections[i];
+-
+ return NULL;
+ }
+
+@@ -2167,9 +2168,11 @@
+ af = a->header.sh_flags;
+
+ ac = 0;
+- if (a->name[0] != '.' || strlen(a->name) != 10 ||
+- strcmp(a->name + 5, ".init"))
++ if (a->name[0] != '.' || strlen(a->name) != 10
++ || strcmp(a->name + 5, ".init") != 0
++ ) {
+ ac |= 32;
++ }
+ if (af & SHF_ALLOC)
+ ac |= 16;
+ if (!(af & SHF_WRITE))
+@@ -2212,7 +2215,7 @@
+ sec->name = name;
+ sec->idx = newidx;
+ if (size)
+- sec->contents = xmalloc(size);
++ sec->contents = xzalloc(size);
+
+ obj_insert_section_load_order(f, sec);
+
+@@ -2227,7 +2230,7 @@
+ int newidx = f->header.e_shnum++;
+ struct obj_section *sec;
+
+- f->sections = xrealloc(f->sections, (newidx + 1) * sizeof(sec));
++ f->sections = xrealloc_vector(f->sections, 2, newidx);
+ f->sections[newidx] = sec = arch_new_section();
+
+ sec->header.sh_type = SHT_PROGBITS;
+@@ -2237,7 +2240,7 @@
+ sec->name = name;
+ sec->idx = newidx;
+ if (size)
+- sec->contents = xmalloc(size);
++ sec->contents = xzalloc(size);
+
+ sec->load_next = f->load_order;
+ f->load_order = sec;
+@@ -2689,8 +2692,7 @@
+ /* Collect the modules' symbols. */
+
+ if (nmod) {
+- ext_modules = modules = xmalloc(nmod * sizeof(*modules));
+- memset(modules, 0, nmod * sizeof(*modules));
++ ext_modules = modules = xzalloc(nmod * sizeof(*modules));
+ for (i = 0, mn = module_names, m = modules;
+ i < nmod; ++i, ++m, mn += strlen(mn) + 1) {
+ struct new_module_info info;
+@@ -2770,13 +2772,14 @@
+ }
+
+
+-static void new_create_this_module(struct obj_file *f, const char *m_name)
++static void new_create_this_module(struct obj_file *f, const char *m_name)
+ {
+ struct obj_section *sec;
+
+ sec = obj_create_alloced_section_first(f, ".this", tgt_sizeof_long,
+ sizeof(struct new_module));
+- memset(sec->contents, 0, sizeof(struct new_module));
++ /* done by obj_create_alloced_section_first: */
++ /*memset(sec->contents, 0, sizeof(struct new_module));*/
+
+ obj_add_symbol(f, SPFX "__this_module", -1,
+ ELF_ST_INFO(STB_LOCAL, STT_OBJECT), sec->idx, 0,
+@@ -2856,18 +2859,19 @@
+ /* We don't want to export symbols residing in sections that
+ aren't loaded. There are a number of these created so that
+ we make sure certain module options don't appear twice. */
+-
+- loaded = alloca(sizeof(int) * (i = f->header.e_shnum));
++ i = f->header.e_shnum;
++ loaded = alloca(sizeof(int) * i);
+ while (--i >= 0)
+ loaded[i] = (f->sections[i]->header.sh_flags & SHF_ALLOC) != 0;
+
+ for (nsyms = i = 0; i < HASH_BUCKETS; ++i) {
+ struct obj_symbol *sym;
+- for (sym = f->symtab[i]; sym; sym = sym->next)
++ for (sym = f->symtab[i]; sym; sym = sym->next) {
+ if (ELF_ST_BIND(sym->info) != STB_LOCAL
+ && sym->secidx <= SHN_HIRESERVE
+ && (sym->secidx >= SHN_LORESERVE
+- || loaded[sym->secidx])) {
++ || loaded[sym->secidx])
++ ) {
+ ElfW(Addr) ofs = nsyms * 2 * tgt_sizeof_void_p;
+
+ obj_symbol_patch(f, sec->idx, ofs, sym);
+@@ -2876,6 +2880,7 @@
+
+ nsyms++;
+ }
++ }
+ }
+
+ obj_extend_section(sec, nsyms * 2 * tgt_sizeof_char_p);
+@@ -2934,9 +2939,11 @@
+ }
+ sec = obj_find_section(f, ".data.init");
+ if (sec) {
|