public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: "Theodore Ts'o" <tytso@mit.edu>
To: Avi Deitcher <avi@deitcher.net>
Cc: linux-ext4@vger.kernel.org
Subject: Re: algorithm for half-md4 used in htree directories
Date: Fri, 15 Oct 2021 15:50:36 -0400	[thread overview]
Message-ID: <YWnbjI9Fo0gKmwS5@mit.edu> (raw)
In-Reply-To: <YWnSMXcR5anaYTEU@mit.edu>

Oh, and taking a quick look at your program, here's at least one of
the bugs:

static void calculate(char *name) {
                      ^^^^^^^^^^
...
    __ext4fs_dirhash(name, sizeof(name), &hinfo);
                           ^^^^^^^^^^^^

With apologies to the movie "The Princess Bride"[1]:

    You fell victim to one of the classic blunders!  The most famous
    is to never get involved in a land war in Asia, but only slightly
    less well-known is this: 'taking the size of a C pointer is
    generally not what you had wanted to do'!  :-)

[1] https://www.youtube.com/watch?v=R7TFPQqglb4

    	  	    	       - Ted

  parent reply	other threads:[~2021-10-15 19:50 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-01 11:49 algorithm for half-md4 used in htree directories Avi Deitcher
2021-10-03 12:47 ` Avi Deitcher
2021-10-03 16:43   ` Andreas Dilger
2021-10-04  7:57     ` Avi Deitcher
2021-10-11 15:30       ` Avi Deitcher
2021-10-11 20:20         ` Theodore Ts'o
2021-10-12  2:58           ` Avi Deitcher
2021-10-12 17:30             ` Theodore Ts'o
2021-10-13  2:20               ` Avi Deitcher
2021-10-15 18:43               ` Avi Deitcher
2021-10-15 19:10                 ` Theodore Ts'o
2021-10-15 19:43                   ` Avi Deitcher
2021-10-15 20:30                     ` Theodore Ts'o
2021-10-15 19:50                   ` Theodore Ts'o [this message]
2021-10-18 16:56                     ` Avi Deitcher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YWnbjI9Fo0gKmwS5@mit.edu \
    --to=tytso@mit.edu \
    --cc=avi@deitcher.net \
    --cc=linux-ext4@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox